mavlink/home/runner/work/rust-mavlink/rust-mavlink/target/debug/build/mavlink-d2a486c2b7960256/out/
asluav.rs

1#![doc = "MAVLink ASLUAV dialect."]
2#![doc = ""]
3#![doc = "This file was automatically generated, do not edit."]
4#![allow(deprecated)]
5#[cfg(feature = "arbitrary")]
6use arbitrary::Arbitrary;
7#[allow(unused_imports)]
8use bitflags::bitflags;
9use mavlink_core::{bytes::Bytes, bytes_mut::BytesMut, MavlinkVersion, Message, MessageData};
10#[allow(unused_imports)]
11use num_derive::FromPrimitive;
12#[allow(unused_imports)]
13use num_derive::ToPrimitive;
14#[allow(unused_imports)]
15use num_traits::FromPrimitive;
16#[allow(unused_imports)]
17use num_traits::ToPrimitive;
18#[cfg(feature = "serde")]
19use serde::{Deserialize, Serialize};
20pub const MINOR_MAVLINK_VERSION: u8 = 3u8;
21#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
22#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23#[cfg_attr(feature = "serde", serde(tag = "type"))]
24#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25#[repr(u32)]
26#[doc = "Actuator configuration, used to change a setting on an actuator. Component information metadata can be used to know which outputs support which commands."]
27pub enum ActuatorConfiguration {
28    #[doc = "Do nothing."]
29    ACTUATOR_CONFIGURATION_NONE = 0,
30    #[doc = "Command the actuator to beep now."]
31    ACTUATOR_CONFIGURATION_BEEP = 1,
32    #[doc = "Permanently set the actuator (ESC) to 3D mode (reversible thrust)."]
33    ACTUATOR_CONFIGURATION_3D_MODE_ON = 2,
34    #[doc = "Permanently set the actuator (ESC) to non 3D mode (non-reversible thrust)."]
35    ACTUATOR_CONFIGURATION_3D_MODE_OFF = 3,
36    #[doc = "Permanently set the actuator (ESC) to spin direction 1 (which can be clockwise or counter-clockwise)."]
37    ACTUATOR_CONFIGURATION_SPIN_DIRECTION1 = 4,
38    #[doc = "Permanently set the actuator (ESC) to spin direction 2 (opposite of direction 1)."]
39    ACTUATOR_CONFIGURATION_SPIN_DIRECTION2 = 5,
40}
41impl ActuatorConfiguration {
42    pub const DEFAULT: Self = Self::ACTUATOR_CONFIGURATION_NONE;
43}
44impl Default for ActuatorConfiguration {
45    fn default() -> Self {
46        Self::DEFAULT
47    }
48}
49#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
50#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
51#[cfg_attr(feature = "serde", serde(tag = "type"))]
52#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
53#[repr(u32)]
54#[doc = "Actuator output function. Values greater or equal to 1000 are autopilot-specific."]
55pub enum ActuatorOutputFunction {
56    #[doc = "No function (disabled)."]
57    ACTUATOR_OUTPUT_FUNCTION_NONE = 0,
58    #[doc = "Motor 1"]
59    ACTUATOR_OUTPUT_FUNCTION_MOTOR1 = 1,
60    #[doc = "Motor 2"]
61    ACTUATOR_OUTPUT_FUNCTION_MOTOR2 = 2,
62    #[doc = "Motor 3"]
63    ACTUATOR_OUTPUT_FUNCTION_MOTOR3 = 3,
64    #[doc = "Motor 4"]
65    ACTUATOR_OUTPUT_FUNCTION_MOTOR4 = 4,
66    #[doc = "Motor 5"]
67    ACTUATOR_OUTPUT_FUNCTION_MOTOR5 = 5,
68    #[doc = "Motor 6"]
69    ACTUATOR_OUTPUT_FUNCTION_MOTOR6 = 6,
70    #[doc = "Motor 7"]
71    ACTUATOR_OUTPUT_FUNCTION_MOTOR7 = 7,
72    #[doc = "Motor 8"]
73    ACTUATOR_OUTPUT_FUNCTION_MOTOR8 = 8,
74    #[doc = "Motor 9"]
75    ACTUATOR_OUTPUT_FUNCTION_MOTOR9 = 9,
76    #[doc = "Motor 10"]
77    ACTUATOR_OUTPUT_FUNCTION_MOTOR10 = 10,
78    #[doc = "Motor 11"]
79    ACTUATOR_OUTPUT_FUNCTION_MOTOR11 = 11,
80    #[doc = "Motor 12"]
81    ACTUATOR_OUTPUT_FUNCTION_MOTOR12 = 12,
82    #[doc = "Motor 13"]
83    ACTUATOR_OUTPUT_FUNCTION_MOTOR13 = 13,
84    #[doc = "Motor 14"]
85    ACTUATOR_OUTPUT_FUNCTION_MOTOR14 = 14,
86    #[doc = "Motor 15"]
87    ACTUATOR_OUTPUT_FUNCTION_MOTOR15 = 15,
88    #[doc = "Motor 16"]
89    ACTUATOR_OUTPUT_FUNCTION_MOTOR16 = 16,
90    #[doc = "Servo 1"]
91    ACTUATOR_OUTPUT_FUNCTION_SERVO1 = 33,
92    #[doc = "Servo 2"]
93    ACTUATOR_OUTPUT_FUNCTION_SERVO2 = 34,
94    #[doc = "Servo 3"]
95    ACTUATOR_OUTPUT_FUNCTION_SERVO3 = 35,
96    #[doc = "Servo 4"]
97    ACTUATOR_OUTPUT_FUNCTION_SERVO4 = 36,
98    #[doc = "Servo 5"]
99    ACTUATOR_OUTPUT_FUNCTION_SERVO5 = 37,
100    #[doc = "Servo 6"]
101    ACTUATOR_OUTPUT_FUNCTION_SERVO6 = 38,
102    #[doc = "Servo 7"]
103    ACTUATOR_OUTPUT_FUNCTION_SERVO7 = 39,
104    #[doc = "Servo 8"]
105    ACTUATOR_OUTPUT_FUNCTION_SERVO8 = 40,
106    #[doc = "Servo 9"]
107    ACTUATOR_OUTPUT_FUNCTION_SERVO9 = 41,
108    #[doc = "Servo 10"]
109    ACTUATOR_OUTPUT_FUNCTION_SERVO10 = 42,
110    #[doc = "Servo 11"]
111    ACTUATOR_OUTPUT_FUNCTION_SERVO11 = 43,
112    #[doc = "Servo 12"]
113    ACTUATOR_OUTPUT_FUNCTION_SERVO12 = 44,
114    #[doc = "Servo 13"]
115    ACTUATOR_OUTPUT_FUNCTION_SERVO13 = 45,
116    #[doc = "Servo 14"]
117    ACTUATOR_OUTPUT_FUNCTION_SERVO14 = 46,
118    #[doc = "Servo 15"]
119    ACTUATOR_OUTPUT_FUNCTION_SERVO15 = 47,
120    #[doc = "Servo 16"]
121    ACTUATOR_OUTPUT_FUNCTION_SERVO16 = 48,
122}
123impl ActuatorOutputFunction {
124    pub const DEFAULT: Self = Self::ACTUATOR_OUTPUT_FUNCTION_NONE;
125}
126impl Default for ActuatorOutputFunction {
127    fn default() -> Self {
128        Self::DEFAULT
129    }
130}
131#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
132#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
133#[cfg_attr(feature = "serde", serde(tag = "type"))]
134#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
135#[repr(u32)]
136#[doc = "Enumeration of the ADSB altimeter types"]
137pub enum AdsbAltitudeType {
138    #[doc = "Altitude reported from a Baro source using QNH reference"]
139    ADSB_ALTITUDE_TYPE_PRESSURE_QNH = 0,
140    #[doc = "Altitude reported from a GNSS source"]
141    ADSB_ALTITUDE_TYPE_GEOMETRIC = 1,
142}
143impl AdsbAltitudeType {
144    pub const DEFAULT: Self = Self::ADSB_ALTITUDE_TYPE_PRESSURE_QNH;
145}
146impl Default for AdsbAltitudeType {
147    fn default() -> Self {
148        Self::DEFAULT
149    }
150}
151#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
152#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
153#[cfg_attr(feature = "serde", serde(tag = "type"))]
154#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
155#[repr(u32)]
156#[doc = "ADSB classification for the type of vehicle emitting the transponder signal"]
157pub enum AdsbEmitterType {
158    ADSB_EMITTER_TYPE_NO_INFO = 0,
159    ADSB_EMITTER_TYPE_LIGHT = 1,
160    ADSB_EMITTER_TYPE_SMALL = 2,
161    ADSB_EMITTER_TYPE_LARGE = 3,
162    ADSB_EMITTER_TYPE_HIGH_VORTEX_LARGE = 4,
163    ADSB_EMITTER_TYPE_HEAVY = 5,
164    ADSB_EMITTER_TYPE_HIGHLY_MANUV = 6,
165    ADSB_EMITTER_TYPE_ROTOCRAFT = 7,
166    ADSB_EMITTER_TYPE_UNASSIGNED = 8,
167    ADSB_EMITTER_TYPE_GLIDER = 9,
168    ADSB_EMITTER_TYPE_LIGHTER_AIR = 10,
169    ADSB_EMITTER_TYPE_PARACHUTE = 11,
170    ADSB_EMITTER_TYPE_ULTRA_LIGHT = 12,
171    ADSB_EMITTER_TYPE_UNASSIGNED2 = 13,
172    ADSB_EMITTER_TYPE_UAV = 14,
173    ADSB_EMITTER_TYPE_SPACE = 15,
174    ADSB_EMITTER_TYPE_UNASSGINED3 = 16,
175    ADSB_EMITTER_TYPE_EMERGENCY_SURFACE = 17,
176    ADSB_EMITTER_TYPE_SERVICE_SURFACE = 18,
177    ADSB_EMITTER_TYPE_POINT_OBSTACLE = 19,
178}
179impl AdsbEmitterType {
180    pub const DEFAULT: Self = Self::ADSB_EMITTER_TYPE_NO_INFO;
181}
182impl Default for AdsbEmitterType {
183    fn default() -> Self {
184        Self::DEFAULT
185    }
186}
187bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These flags indicate status such as data validity of each data source. Set = data valid"] pub struct AdsbFlags : u16 { const ADSB_FLAGS_VALID_COORDS = 1 ; const ADSB_FLAGS_VALID_ALTITUDE = 2 ; const ADSB_FLAGS_VALID_HEADING = 4 ; const ADSB_FLAGS_VALID_VELOCITY = 8 ; const ADSB_FLAGS_VALID_CALLSIGN = 16 ; const ADSB_FLAGS_VALID_SQUAWK = 32 ; const ADSB_FLAGS_SIMULATED = 64 ; const ADSB_FLAGS_VERTICAL_VELOCITY_VALID = 128 ; const ADSB_FLAGS_BARO_VALID = 256 ; const ADSB_FLAGS_SOURCE_UAT = 32768 ; } }
188impl AdsbFlags {
189    pub const DEFAULT: Self = Self::ADSB_FLAGS_VALID_COORDS;
190}
191impl Default for AdsbFlags {
192    fn default() -> Self {
193        Self::DEFAULT
194    }
195}
196bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These flags are used in the AIS_VESSEL.fields bitmask to indicate validity of data in the other message fields. When set, the data is valid."] pub struct AisFlags : u16 { # [doc = "1 = Position accuracy less than 10m, 0 = position accuracy greater than 10m."] const AIS_FLAGS_POSITION_ACCURACY = 1 ; const AIS_FLAGS_VALID_COG = 2 ; const AIS_FLAGS_VALID_VELOCITY = 4 ; # [doc = "1 = Velocity over 52.5765m/s (102.2 knots)"] const AIS_FLAGS_HIGH_VELOCITY = 8 ; const AIS_FLAGS_VALID_TURN_RATE = 16 ; # [doc = "Only the sign of the returned turn rate value is valid, either greater than 5deg/30s or less than -5deg/30s"] const AIS_FLAGS_TURN_RATE_SIGN_ONLY = 32 ; const AIS_FLAGS_VALID_DIMENSIONS = 64 ; # [doc = "Distance to bow is larger than 511m"] const AIS_FLAGS_LARGE_BOW_DIMENSION = 128 ; # [doc = "Distance to stern is larger than 511m"] const AIS_FLAGS_LARGE_STERN_DIMENSION = 256 ; # [doc = "Distance to port side is larger than 63m"] const AIS_FLAGS_LARGE_PORT_DIMENSION = 512 ; # [doc = "Distance to starboard side is larger than 63m"] const AIS_FLAGS_LARGE_STARBOARD_DIMENSION = 1024 ; const AIS_FLAGS_VALID_CALLSIGN = 2048 ; const AIS_FLAGS_VALID_NAME = 4096 ; } }
197impl AisFlags {
198    pub const DEFAULT: Self = Self::AIS_FLAGS_POSITION_ACCURACY;
199}
200impl Default for AisFlags {
201    fn default() -> Self {
202        Self::DEFAULT
203    }
204}
205#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
206#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
207#[cfg_attr(feature = "serde", serde(tag = "type"))]
208#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
209#[repr(u32)]
210#[doc = "Navigational status of AIS vessel, enum duplicated from AIS standard, <https://gpsd.gitlab.io/gpsd/AIVDM.html>"]
211pub enum AisNavStatus {
212    #[doc = "Under way using engine."]
213    UNDER_WAY = 0,
214    AIS_NAV_ANCHORED = 1,
215    AIS_NAV_UN_COMMANDED = 2,
216    AIS_NAV_RESTRICTED_MANOEUVERABILITY = 3,
217    AIS_NAV_DRAUGHT_CONSTRAINED = 4,
218    AIS_NAV_MOORED = 5,
219    AIS_NAV_AGROUND = 6,
220    AIS_NAV_FISHING = 7,
221    AIS_NAV_SAILING = 8,
222    AIS_NAV_RESERVED_HSC = 9,
223    AIS_NAV_RESERVED_WIG = 10,
224    AIS_NAV_RESERVED_1 = 11,
225    AIS_NAV_RESERVED_2 = 12,
226    AIS_NAV_RESERVED_3 = 13,
227    #[doc = "Search And Rescue Transponder."]
228    AIS_NAV_AIS_SART = 14,
229    #[doc = "Not available (default)."]
230    AIS_NAV_UNKNOWN = 15,
231}
232impl AisNavStatus {
233    pub const DEFAULT: Self = Self::UNDER_WAY;
234}
235impl Default for AisNavStatus {
236    fn default() -> Self {
237        Self::DEFAULT
238    }
239}
240#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
241#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
242#[cfg_attr(feature = "serde", serde(tag = "type"))]
243#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
244#[repr(u32)]
245#[doc = "Type of AIS vessel, enum duplicated from AIS standard, <https://gpsd.gitlab.io/gpsd/AIVDM.html>"]
246pub enum AisType {
247    #[doc = "Not available (default)."]
248    AIS_TYPE_UNKNOWN = 0,
249    AIS_TYPE_RESERVED_1 = 1,
250    AIS_TYPE_RESERVED_2 = 2,
251    AIS_TYPE_RESERVED_3 = 3,
252    AIS_TYPE_RESERVED_4 = 4,
253    AIS_TYPE_RESERVED_5 = 5,
254    AIS_TYPE_RESERVED_6 = 6,
255    AIS_TYPE_RESERVED_7 = 7,
256    AIS_TYPE_RESERVED_8 = 8,
257    AIS_TYPE_RESERVED_9 = 9,
258    AIS_TYPE_RESERVED_10 = 10,
259    AIS_TYPE_RESERVED_11 = 11,
260    AIS_TYPE_RESERVED_12 = 12,
261    AIS_TYPE_RESERVED_13 = 13,
262    AIS_TYPE_RESERVED_14 = 14,
263    AIS_TYPE_RESERVED_15 = 15,
264    AIS_TYPE_RESERVED_16 = 16,
265    AIS_TYPE_RESERVED_17 = 17,
266    AIS_TYPE_RESERVED_18 = 18,
267    AIS_TYPE_RESERVED_19 = 19,
268    #[doc = "Wing In Ground effect."]
269    AIS_TYPE_WIG = 20,
270    AIS_TYPE_WIG_HAZARDOUS_A = 21,
271    AIS_TYPE_WIG_HAZARDOUS_B = 22,
272    AIS_TYPE_WIG_HAZARDOUS_C = 23,
273    AIS_TYPE_WIG_HAZARDOUS_D = 24,
274    AIS_TYPE_WIG_RESERVED_1 = 25,
275    AIS_TYPE_WIG_RESERVED_2 = 26,
276    AIS_TYPE_WIG_RESERVED_3 = 27,
277    AIS_TYPE_WIG_RESERVED_4 = 28,
278    AIS_TYPE_WIG_RESERVED_5 = 29,
279    AIS_TYPE_FISHING = 30,
280    AIS_TYPE_TOWING = 31,
281    #[doc = "Towing: length exceeds 200m or breadth exceeds 25m."]
282    AIS_TYPE_TOWING_LARGE = 32,
283    #[doc = "Dredging or other underwater ops."]
284    AIS_TYPE_DREDGING = 33,
285    AIS_TYPE_DIVING = 34,
286    AIS_TYPE_MILITARY = 35,
287    AIS_TYPE_SAILING = 36,
288    AIS_TYPE_PLEASURE = 37,
289    AIS_TYPE_RESERVED_20 = 38,
290    AIS_TYPE_RESERVED_21 = 39,
291    #[doc = "High Speed Craft."]
292    AIS_TYPE_HSC = 40,
293    AIS_TYPE_HSC_HAZARDOUS_A = 41,
294    AIS_TYPE_HSC_HAZARDOUS_B = 42,
295    AIS_TYPE_HSC_HAZARDOUS_C = 43,
296    AIS_TYPE_HSC_HAZARDOUS_D = 44,
297    AIS_TYPE_HSC_RESERVED_1 = 45,
298    AIS_TYPE_HSC_RESERVED_2 = 46,
299    AIS_TYPE_HSC_RESERVED_3 = 47,
300    AIS_TYPE_HSC_RESERVED_4 = 48,
301    AIS_TYPE_HSC_UNKNOWN = 49,
302    AIS_TYPE_PILOT = 50,
303    #[doc = "Search And Rescue vessel."]
304    AIS_TYPE_SAR = 51,
305    AIS_TYPE_TUG = 52,
306    AIS_TYPE_PORT_TENDER = 53,
307    #[doc = "Anti-pollution equipment."]
308    AIS_TYPE_ANTI_POLLUTION = 54,
309    AIS_TYPE_LAW_ENFORCEMENT = 55,
310    AIS_TYPE_SPARE_LOCAL_1 = 56,
311    AIS_TYPE_SPARE_LOCAL_2 = 57,
312    AIS_TYPE_MEDICAL_TRANSPORT = 58,
313    #[doc = "Noncombatant ship according to RR Resolution No. 18."]
314    AIS_TYPE_NONECOMBATANT = 59,
315    AIS_TYPE_PASSENGER = 60,
316    AIS_TYPE_PASSENGER_HAZARDOUS_A = 61,
317    AIS_TYPE_PASSENGER_HAZARDOUS_B = 62,
318    AIS_TYPE_PASSENGER_HAZARDOUS_C = 63,
319    AIS_TYPE_PASSENGER_HAZARDOUS_D = 64,
320    AIS_TYPE_PASSENGER_RESERVED_1 = 65,
321    AIS_TYPE_PASSENGER_RESERVED_2 = 66,
322    AIS_TYPE_PASSENGER_RESERVED_3 = 67,
323    AIS_TYPE_PASSENGER_RESERVED_4 = 68,
324    AIS_TYPE_PASSENGER_UNKNOWN = 69,
325    AIS_TYPE_CARGO = 70,
326    AIS_TYPE_CARGO_HAZARDOUS_A = 71,
327    AIS_TYPE_CARGO_HAZARDOUS_B = 72,
328    AIS_TYPE_CARGO_HAZARDOUS_C = 73,
329    AIS_TYPE_CARGO_HAZARDOUS_D = 74,
330    AIS_TYPE_CARGO_RESERVED_1 = 75,
331    AIS_TYPE_CARGO_RESERVED_2 = 76,
332    AIS_TYPE_CARGO_RESERVED_3 = 77,
333    AIS_TYPE_CARGO_RESERVED_4 = 78,
334    AIS_TYPE_CARGO_UNKNOWN = 79,
335    AIS_TYPE_TANKER = 80,
336    AIS_TYPE_TANKER_HAZARDOUS_A = 81,
337    AIS_TYPE_TANKER_HAZARDOUS_B = 82,
338    AIS_TYPE_TANKER_HAZARDOUS_C = 83,
339    AIS_TYPE_TANKER_HAZARDOUS_D = 84,
340    AIS_TYPE_TANKER_RESERVED_1 = 85,
341    AIS_TYPE_TANKER_RESERVED_2 = 86,
342    AIS_TYPE_TANKER_RESERVED_3 = 87,
343    AIS_TYPE_TANKER_RESERVED_4 = 88,
344    AIS_TYPE_TANKER_UNKNOWN = 89,
345    AIS_TYPE_OTHER = 90,
346    AIS_TYPE_OTHER_HAZARDOUS_A = 91,
347    AIS_TYPE_OTHER_HAZARDOUS_B = 92,
348    AIS_TYPE_OTHER_HAZARDOUS_C = 93,
349    AIS_TYPE_OTHER_HAZARDOUS_D = 94,
350    AIS_TYPE_OTHER_RESERVED_1 = 95,
351    AIS_TYPE_OTHER_RESERVED_2 = 96,
352    AIS_TYPE_OTHER_RESERVED_3 = 97,
353    AIS_TYPE_OTHER_RESERVED_4 = 98,
354    AIS_TYPE_OTHER_UNKNOWN = 99,
355}
356impl AisType {
357    pub const DEFAULT: Self = Self::AIS_TYPE_UNKNOWN;
358}
359impl Default for AisType {
360    fn default() -> Self {
361        Self::DEFAULT
362    }
363}
364bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Bitmap to indicate which dimensions should be ignored by the vehicle: a value of 0b00000000 indicates that none of the setpoint dimensions should be ignored."] pub struct AttitudeTargetTypemask : u8 { # [doc = "Ignore body roll rate"] const ATTITUDE_TARGET_TYPEMASK_BODY_ROLL_RATE_IGNORE = 1 ; # [doc = "Ignore body pitch rate"] const ATTITUDE_TARGET_TYPEMASK_BODY_PITCH_RATE_IGNORE = 2 ; # [doc = "Ignore body yaw rate"] const ATTITUDE_TARGET_TYPEMASK_BODY_YAW_RATE_IGNORE = 4 ; # [doc = "Use 3D body thrust setpoint instead of throttle"] const ATTITUDE_TARGET_TYPEMASK_THRUST_BODY_SET = 32 ; # [doc = "Ignore throttle"] const ATTITUDE_TARGET_TYPEMASK_THROTTLE_IGNORE = 64 ; # [doc = "Ignore attitude"] const ATTITUDE_TARGET_TYPEMASK_ATTITUDE_IGNORE = 128 ; } }
365impl AttitudeTargetTypemask {
366    pub const DEFAULT: Self = Self::ATTITUDE_TARGET_TYPEMASK_BODY_ROLL_RATE_IGNORE;
367}
368impl Default for AttitudeTargetTypemask {
369    fn default() -> Self {
370        Self::DEFAULT
371    }
372}
373#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
374#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
375#[cfg_attr(feature = "serde", serde(tag = "type"))]
376#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
377#[repr(u32)]
378#[doc = "Axes that will be autotuned by MAV_CMD_DO_AUTOTUNE_ENABLE.         Note that at least one flag must be set in MAV_CMD_DO_AUTOTUNE_ENABLE.param2: if none are set, the flight stack will tune its default set of axes."]
379pub enum AutotuneAxis {
380    #[doc = "Autotune roll axis."]
381    AUTOTUNE_AXIS_ROLL = 1,
382    #[doc = "Autotune pitch axis."]
383    AUTOTUNE_AXIS_PITCH = 2,
384    #[doc = "Autotune yaw axis."]
385    AUTOTUNE_AXIS_YAW = 4,
386}
387impl AutotuneAxis {
388    pub const DEFAULT: Self = Self::AUTOTUNE_AXIS_ROLL;
389}
390impl Default for AutotuneAxis {
391    fn default() -> Self {
392        Self::DEFAULT
393    }
394}
395bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Camera capability flags (Bitmap)"] pub struct CameraCapFlags : u32 { # [doc = "Camera is able to record video"] const CAMERA_CAP_FLAGS_CAPTURE_VIDEO = 1 ; # [doc = "Camera is able to capture images"] const CAMERA_CAP_FLAGS_CAPTURE_IMAGE = 2 ; # [doc = "Camera has separate Video and Image/Photo modes (MAV_CMD_SET_CAMERA_MODE)"] const CAMERA_CAP_FLAGS_HAS_MODES = 4 ; # [doc = "Camera can capture images while in video mode"] const CAMERA_CAP_FLAGS_CAN_CAPTURE_IMAGE_IN_VIDEO_MODE = 8 ; # [doc = "Camera can capture videos while in Photo/Image mode"] const CAMERA_CAP_FLAGS_CAN_CAPTURE_VIDEO_IN_IMAGE_MODE = 16 ; # [doc = "Camera has image survey mode (MAV_CMD_SET_CAMERA_MODE)"] const CAMERA_CAP_FLAGS_HAS_IMAGE_SURVEY_MODE = 32 ; # [doc = "Camera has basic zoom control (MAV_CMD_SET_CAMERA_ZOOM)"] const CAMERA_CAP_FLAGS_HAS_BASIC_ZOOM = 64 ; # [doc = "Camera has basic focus control (MAV_CMD_SET_CAMERA_FOCUS)"] const CAMERA_CAP_FLAGS_HAS_BASIC_FOCUS = 128 ; # [doc = "Camera has video streaming capabilities (request VIDEO_STREAM_INFORMATION with MAV_CMD_REQUEST_MESSAGE for video streaming info)"] const CAMERA_CAP_FLAGS_HAS_VIDEO_STREAM = 256 ; # [doc = "Camera supports tracking of a point on the camera view."] const CAMERA_CAP_FLAGS_HAS_TRACKING_POINT = 512 ; # [doc = "Camera supports tracking of a selection rectangle on the camera view."] const CAMERA_CAP_FLAGS_HAS_TRACKING_RECTANGLE = 1024 ; # [doc = "Camera supports tracking geo status (CAMERA_TRACKING_GEO_STATUS)."] const CAMERA_CAP_FLAGS_HAS_TRACKING_GEO_STATUS = 2048 ; # [doc = "Camera supports absolute thermal range (request CAMERA_THERMAL_RANGE with MAV_CMD_REQUEST_MESSAGE)."] const CAMERA_CAP_FLAGS_HAS_THERMAL_RANGE = 4096 ; } }
396impl CameraCapFlags {
397    pub const DEFAULT: Self = Self::CAMERA_CAP_FLAGS_CAPTURE_VIDEO;
398}
399impl Default for CameraCapFlags {
400    fn default() -> Self {
401        Self::DEFAULT
402    }
403}
404#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
405#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
406#[cfg_attr(feature = "serde", serde(tag = "type"))]
407#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
408#[repr(u32)]
409#[doc = "Camera Modes."]
410pub enum CameraMode {
411    #[doc = "Camera is in image/photo capture mode."]
412    CAMERA_MODE_IMAGE = 0,
413    #[doc = "Camera is in video capture mode."]
414    CAMERA_MODE_VIDEO = 1,
415    #[doc = "Camera is in image survey capture mode. It allows for camera controller to do specific settings for surveys."]
416    CAMERA_MODE_IMAGE_SURVEY = 2,
417}
418impl CameraMode {
419    pub const DEFAULT: Self = Self::CAMERA_MODE_IMAGE;
420}
421impl Default for CameraMode {
422    fn default() -> Self {
423        Self::DEFAULT
424    }
425}
426#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
427#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
428#[cfg_attr(feature = "serde", serde(tag = "type"))]
429#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
430#[repr(u32)]
431#[doc = "Camera sources for MAV_CMD_SET_CAMERA_SOURCE"]
432pub enum CameraSource {
433    #[doc = "Default camera source."]
434    CAMERA_SOURCE_DEFAULT = 0,
435    #[doc = "RGB camera source."]
436    CAMERA_SOURCE_RGB = 1,
437    #[doc = "IR camera source."]
438    CAMERA_SOURCE_IR = 2,
439    #[doc = "NDVI camera source."]
440    CAMERA_SOURCE_NDVI = 3,
441}
442impl CameraSource {
443    pub const DEFAULT: Self = Self::CAMERA_SOURCE_DEFAULT;
444}
445impl Default for CameraSource {
446    fn default() -> Self {
447        Self::DEFAULT
448    }
449}
450#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
451#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
452#[cfg_attr(feature = "serde", serde(tag = "type"))]
453#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
454#[repr(u32)]
455#[doc = "Camera tracking modes"]
456pub enum CameraTrackingMode {
457    #[doc = "Not tracking"]
458    CAMERA_TRACKING_MODE_NONE = 0,
459    #[doc = "Target is a point"]
460    CAMERA_TRACKING_MODE_POINT = 1,
461    #[doc = "Target is a rectangle"]
462    CAMERA_TRACKING_MODE_RECTANGLE = 2,
463}
464impl CameraTrackingMode {
465    pub const DEFAULT: Self = Self::CAMERA_TRACKING_MODE_NONE;
466}
467impl Default for CameraTrackingMode {
468    fn default() -> Self {
469        Self::DEFAULT
470    }
471}
472#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
473#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
474#[cfg_attr(feature = "serde", serde(tag = "type"))]
475#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
476#[repr(u32)]
477#[doc = "Camera tracking status flags"]
478pub enum CameraTrackingStatusFlags {
479    #[doc = "Camera is not tracking"]
480    CAMERA_TRACKING_STATUS_FLAGS_IDLE = 0,
481    #[doc = "Camera is tracking"]
482    CAMERA_TRACKING_STATUS_FLAGS_ACTIVE = 1,
483    #[doc = "Camera tracking in error state"]
484    CAMERA_TRACKING_STATUS_FLAGS_ERROR = 2,
485}
486impl CameraTrackingStatusFlags {
487    pub const DEFAULT: Self = Self::CAMERA_TRACKING_STATUS_FLAGS_IDLE;
488}
489impl Default for CameraTrackingStatusFlags {
490    fn default() -> Self {
491        Self::DEFAULT
492    }
493}
494bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Camera tracking target data (shows where tracked target is within image)"] pub struct CameraTrackingTargetData : u8 { # [doc = "Target data embedded in image data (proprietary)"] const CAMERA_TRACKING_TARGET_DATA_EMBEDDED = 1 ; # [doc = "Target data rendered in image"] const CAMERA_TRACKING_TARGET_DATA_RENDERED = 2 ; # [doc = "Target data within status message (Point or Rectangle)"] const CAMERA_TRACKING_TARGET_DATA_IN_STATUS = 4 ; } }
495impl CameraTrackingTargetData {
496    pub const DEFAULT: Self = Self::CAMERA_TRACKING_TARGET_DATA_EMBEDDED;
497}
498impl Default for CameraTrackingTargetData {
499    fn default() -> Self {
500        Self::DEFAULT
501    }
502}
503#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
504#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
505#[cfg_attr(feature = "serde", serde(tag = "type"))]
506#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
507#[repr(u32)]
508#[doc = "Zoom types for MAV_CMD_SET_CAMERA_ZOOM"]
509pub enum CameraZoomType {
510    #[doc = "Zoom one step increment (-1 for wide, 1 for tele)"]
511    ZOOM_TYPE_STEP = 0,
512    #[doc = "Continuous normalized zoom in/out rate until stopped. Range -1..1, negative: wide, positive: narrow/tele, 0 to stop zooming. Other values should be clipped to the range."]
513    ZOOM_TYPE_CONTINUOUS = 1,
514    #[doc = "Zoom value as proportion of full camera range (a percentage value between 0.0 and 100.0)"]
515    ZOOM_TYPE_RANGE = 2,
516    #[doc = "Zoom value/variable focal length in millimetres. Note that there is no message to get the valid zoom range of the camera, so this can type can only be used for cameras where the zoom range is known (implying that this cannot reliably be used in a GCS for an arbitrary camera)"]
517    ZOOM_TYPE_FOCAL_LENGTH = 3,
518    #[doc = "Zoom value as horizontal field of view in degrees."]
519    ZOOM_TYPE_HORIZONTAL_FOV = 4,
520}
521impl CameraZoomType {
522    pub const DEFAULT: Self = Self::ZOOM_TYPE_STEP;
523}
524impl Default for CameraZoomType {
525    fn default() -> Self {
526        Self::DEFAULT
527    }
528}
529#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
530#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
531#[cfg_attr(feature = "serde", serde(tag = "type"))]
532#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
533#[repr(u32)]
534pub enum CanFilterOp {
535    CAN_FILTER_REPLACE = 0,
536    CAN_FILTER_ADD = 1,
537    CAN_FILTER_REMOVE = 2,
538}
539impl CanFilterOp {
540    pub const DEFAULT: Self = Self::CAN_FILTER_REPLACE;
541}
542impl Default for CanFilterOp {
543    fn default() -> Self {
544        Self::DEFAULT
545    }
546}
547#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
548#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
549#[cfg_attr(feature = "serde", serde(tag = "type"))]
550#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
551#[repr(u32)]
552#[doc = "Possible responses from a CELLULAR_CONFIG message."]
553pub enum CellularConfigResponse {
554    #[doc = "Changes accepted."]
555    CELLULAR_CONFIG_RESPONSE_ACCEPTED = 0,
556    #[doc = "Invalid APN."]
557    CELLULAR_CONFIG_RESPONSE_APN_ERROR = 1,
558    #[doc = "Invalid PIN."]
559    CELLULAR_CONFIG_RESPONSE_PIN_ERROR = 2,
560    #[doc = "Changes rejected."]
561    CELLULAR_CONFIG_RESPONSE_REJECTED = 3,
562    #[doc = "PUK is required to unblock SIM card."]
563    CELLULAR_CONFIG_BLOCKED_PUK_REQUIRED = 4,
564}
565impl CellularConfigResponse {
566    pub const DEFAULT: Self = Self::CELLULAR_CONFIG_RESPONSE_ACCEPTED;
567}
568impl Default for CellularConfigResponse {
569    fn default() -> Self {
570        Self::DEFAULT
571    }
572}
573#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
574#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
575#[cfg_attr(feature = "serde", serde(tag = "type"))]
576#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
577#[repr(u32)]
578#[doc = "These flags are used to diagnose the failure state of CELLULAR_STATUS"]
579pub enum CellularNetworkFailedReason {
580    #[doc = "No error"]
581    CELLULAR_NETWORK_FAILED_REASON_NONE = 0,
582    #[doc = "Error state is unknown"]
583    CELLULAR_NETWORK_FAILED_REASON_UNKNOWN = 1,
584    #[doc = "SIM is required for the modem but missing"]
585    CELLULAR_NETWORK_FAILED_REASON_SIM_MISSING = 2,
586    #[doc = "SIM is available, but not usable for connection"]
587    CELLULAR_NETWORK_FAILED_REASON_SIM_ERROR = 3,
588}
589impl CellularNetworkFailedReason {
590    pub const DEFAULT: Self = Self::CELLULAR_NETWORK_FAILED_REASON_NONE;
591}
592impl Default for CellularNetworkFailedReason {
593    fn default() -> Self {
594        Self::DEFAULT
595    }
596}
597#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
598#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
599#[cfg_attr(feature = "serde", serde(tag = "type"))]
600#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
601#[repr(u32)]
602#[doc = "Cellular network radio type"]
603pub enum CellularNetworkRadioType {
604    CELLULAR_NETWORK_RADIO_TYPE_NONE = 0,
605    CELLULAR_NETWORK_RADIO_TYPE_GSM = 1,
606    CELLULAR_NETWORK_RADIO_TYPE_CDMA = 2,
607    CELLULAR_NETWORK_RADIO_TYPE_WCDMA = 3,
608    CELLULAR_NETWORK_RADIO_TYPE_LTE = 4,
609}
610impl CellularNetworkRadioType {
611    pub const DEFAULT: Self = Self::CELLULAR_NETWORK_RADIO_TYPE_NONE;
612}
613impl Default for CellularNetworkRadioType {
614    fn default() -> Self {
615        Self::DEFAULT
616    }
617}
618#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
619#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
620#[cfg_attr(feature = "serde", serde(tag = "type"))]
621#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
622#[repr(u32)]
623#[doc = "These flags encode the cellular network status"]
624pub enum CellularStatusFlag {
625    #[doc = "State unknown or not reportable."]
626    CELLULAR_STATUS_FLAG_UNKNOWN = 0,
627    #[doc = "Modem is unusable"]
628    CELLULAR_STATUS_FLAG_FAILED = 1,
629    #[doc = "Modem is being initialized"]
630    CELLULAR_STATUS_FLAG_INITIALIZING = 2,
631    #[doc = "Modem is locked"]
632    CELLULAR_STATUS_FLAG_LOCKED = 3,
633    #[doc = "Modem is not enabled and is powered down"]
634    CELLULAR_STATUS_FLAG_DISABLED = 4,
635    #[doc = "Modem is currently transitioning to the CELLULAR_STATUS_FLAG_DISABLED state"]
636    CELLULAR_STATUS_FLAG_DISABLING = 5,
637    #[doc = "Modem is currently transitioning to the CELLULAR_STATUS_FLAG_ENABLED state"]
638    CELLULAR_STATUS_FLAG_ENABLING = 6,
639    #[doc = "Modem is enabled and powered on but not registered with a network provider and not available for data connections"]
640    CELLULAR_STATUS_FLAG_ENABLED = 7,
641    #[doc = "Modem is searching for a network provider to register"]
642    CELLULAR_STATUS_FLAG_SEARCHING = 8,
643    #[doc = "Modem is registered with a network provider, and data connections and messaging may be available for use"]
644    CELLULAR_STATUS_FLAG_REGISTERED = 9,
645    #[doc = "Modem is disconnecting and deactivating the last active packet data bearer. This state will not be entered if more than one packet data bearer is active and one of the active bearers is deactivated"]
646    CELLULAR_STATUS_FLAG_DISCONNECTING = 10,
647    #[doc = "Modem is activating and connecting the first packet data bearer. Subsequent bearer activations when another bearer is already active do not cause this state to be entered"]
648    CELLULAR_STATUS_FLAG_CONNECTING = 11,
649    #[doc = "One or more packet data bearers is active and connected"]
650    CELLULAR_STATUS_FLAG_CONNECTED = 12,
651}
652impl CellularStatusFlag {
653    pub const DEFAULT: Self = Self::CELLULAR_STATUS_FLAG_UNKNOWN;
654}
655impl Default for CellularStatusFlag {
656    fn default() -> Self {
657        Self::DEFAULT
658    }
659}
660#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
661#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
662#[cfg_attr(feature = "serde", serde(tag = "type"))]
663#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
664#[repr(u32)]
665#[doc = "Supported component metadata types. These are used in the \"general\" metadata file returned by COMPONENT_METADATA to provide information about supported metadata types. The types are not used directly in MAVLink messages."]
666pub enum CompMetadataType {
667    #[doc = "General information about the component. General metadata includes information about other metadata types supported by the component. Files of this type must be supported, and must be downloadable from vehicle using a MAVLink FTP URI."]
668    COMP_METADATA_TYPE_GENERAL = 0,
669    #[doc = "Parameter meta data."]
670    COMP_METADATA_TYPE_PARAMETER = 1,
671    #[doc = "Meta data that specifies which commands and command parameters the vehicle supports. (WIP)"]
672    COMP_METADATA_TYPE_COMMANDS = 2,
673    #[doc = "Meta data that specifies external non-MAVLink peripherals."]
674    COMP_METADATA_TYPE_PERIPHERALS = 3,
675    #[doc = "Meta data for the events interface."]
676    COMP_METADATA_TYPE_EVENTS = 4,
677    #[doc = "Meta data for actuator configuration (motors, servos and vehicle geometry) and testing."]
678    COMP_METADATA_TYPE_ACTUATORS = 5,
679}
680impl CompMetadataType {
681    pub const DEFAULT: Self = Self::COMP_METADATA_TYPE_GENERAL;
682}
683impl Default for CompMetadataType {
684    fn default() -> Self {
685        Self::DEFAULT
686    }
687}
688#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
689#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
690#[cfg_attr(feature = "serde", serde(tag = "type"))]
691#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
692#[repr(u32)]
693#[doc = "Indicates the ESC connection type."]
694pub enum EscConnectionType {
695    #[doc = "Traditional PPM ESC."]
696    ESC_CONNECTION_TYPE_PPM = 0,
697    #[doc = "Serial Bus connected ESC."]
698    ESC_CONNECTION_TYPE_SERIAL = 1,
699    #[doc = "One Shot PPM ESC."]
700    ESC_CONNECTION_TYPE_ONESHOT = 2,
701    #[doc = "I2C ESC."]
702    ESC_CONNECTION_TYPE_I2C = 3,
703    #[doc = "CAN-Bus ESC."]
704    ESC_CONNECTION_TYPE_CAN = 4,
705    #[doc = "DShot ESC."]
706    ESC_CONNECTION_TYPE_DSHOT = 5,
707}
708impl EscConnectionType {
709    pub const DEFAULT: Self = Self::ESC_CONNECTION_TYPE_PPM;
710}
711impl Default for EscConnectionType {
712    fn default() -> Self {
713        Self::DEFAULT
714    }
715}
716bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags to report ESC failures."] pub struct EscFailureFlags : u16 { # [doc = "Over current failure."] const ESC_FAILURE_OVER_CURRENT = 1 ; # [doc = "Over voltage failure."] const ESC_FAILURE_OVER_VOLTAGE = 2 ; # [doc = "Over temperature failure."] const ESC_FAILURE_OVER_TEMPERATURE = 4 ; # [doc = "Over RPM failure."] const ESC_FAILURE_OVER_RPM = 8 ; # [doc = "Inconsistent command failure i.e. out of bounds."] const ESC_FAILURE_INCONSISTENT_CMD = 16 ; # [doc = "Motor stuck failure."] const ESC_FAILURE_MOTOR_STUCK = 32 ; # [doc = "Generic ESC failure."] const ESC_FAILURE_GENERIC = 64 ; } }
717impl EscFailureFlags {
718    pub const DEFAULT: Self = Self::ESC_FAILURE_OVER_CURRENT;
719}
720impl Default for EscFailureFlags {
721    fn default() -> Self {
722        Self::DEFAULT
723    }
724}
725bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags in ESTIMATOR_STATUS message"] pub struct EstimatorStatusFlags : u16 { # [doc = "True if the attitude estimate is good"] const ESTIMATOR_ATTITUDE = 1 ; # [doc = "True if the horizontal velocity estimate is good"] const ESTIMATOR_VELOCITY_HORIZ = 2 ; # [doc = "True if the  vertical velocity estimate is good"] const ESTIMATOR_VELOCITY_VERT = 4 ; # [doc = "True if the horizontal position (relative) estimate is good"] const ESTIMATOR_POS_HORIZ_REL = 8 ; # [doc = "True if the horizontal position (absolute) estimate is good"] const ESTIMATOR_POS_HORIZ_ABS = 16 ; # [doc = "True if the vertical position (absolute) estimate is good"] const ESTIMATOR_POS_VERT_ABS = 32 ; # [doc = "True if the vertical position (above ground) estimate is good"] const ESTIMATOR_POS_VERT_AGL = 64 ; # [doc = "True if the EKF is in a constant position mode and is not using external measurements (eg GPS or optical flow)"] const ESTIMATOR_CONST_POS_MODE = 128 ; # [doc = "True if the EKF has sufficient data to enter a mode that will provide a (relative) position estimate"] const ESTIMATOR_PRED_POS_HORIZ_REL = 256 ; # [doc = "True if the EKF has sufficient data to enter a mode that will provide a (absolute) position estimate"] const ESTIMATOR_PRED_POS_HORIZ_ABS = 512 ; # [doc = "True if the EKF has detected a GPS glitch"] const ESTIMATOR_GPS_GLITCH = 1024 ; # [doc = "True if the EKF has detected bad accelerometer data"] const ESTIMATOR_ACCEL_ERROR = 2048 ; } }
726impl EstimatorStatusFlags {
727    pub const DEFAULT: Self = Self::ESTIMATOR_ATTITUDE;
728}
729impl Default for EstimatorStatusFlags {
730    fn default() -> Self {
731        Self::DEFAULT
732    }
733}
734#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
735#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
736#[cfg_attr(feature = "serde", serde(tag = "type"))]
737#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
738#[repr(u32)]
739#[doc = "List of possible failure type to inject."]
740pub enum FailureType {
741    #[doc = "No failure injected, used to reset a previous failure."]
742    FAILURE_TYPE_OK = 0,
743    #[doc = "Sets unit off, so completely non-responsive."]
744    FAILURE_TYPE_OFF = 1,
745    #[doc = "Unit is stuck e.g. keeps reporting the same value."]
746    FAILURE_TYPE_STUCK = 2,
747    #[doc = "Unit is reporting complete garbage."]
748    FAILURE_TYPE_GARBAGE = 3,
749    #[doc = "Unit is consistently wrong."]
750    FAILURE_TYPE_WRONG = 4,
751    #[doc = "Unit is slow, so e.g. reporting at slower than expected rate."]
752    FAILURE_TYPE_SLOW = 5,
753    #[doc = "Data of unit is delayed in time."]
754    FAILURE_TYPE_DELAYED = 6,
755    #[doc = "Unit is sometimes working, sometimes not."]
756    FAILURE_TYPE_INTERMITTENT = 7,
757}
758impl FailureType {
759    pub const DEFAULT: Self = Self::FAILURE_TYPE_OK;
760}
761impl Default for FailureType {
762    fn default() -> Self {
763        Self::DEFAULT
764    }
765}
766#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
767#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
768#[cfg_attr(feature = "serde", serde(tag = "type"))]
769#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
770#[repr(u32)]
771#[doc = "List of possible units where failures can be injected."]
772pub enum FailureUnit {
773    FAILURE_UNIT_SENSOR_GYRO = 0,
774    FAILURE_UNIT_SENSOR_ACCEL = 1,
775    FAILURE_UNIT_SENSOR_MAG = 2,
776    FAILURE_UNIT_SENSOR_BARO = 3,
777    FAILURE_UNIT_SENSOR_GPS = 4,
778    FAILURE_UNIT_SENSOR_OPTICAL_FLOW = 5,
779    FAILURE_UNIT_SENSOR_VIO = 6,
780    FAILURE_UNIT_SENSOR_DISTANCE_SENSOR = 7,
781    FAILURE_UNIT_SENSOR_AIRSPEED = 8,
782    FAILURE_UNIT_SYSTEM_BATTERY = 100,
783    FAILURE_UNIT_SYSTEM_MOTOR = 101,
784    FAILURE_UNIT_SYSTEM_SERVO = 102,
785    FAILURE_UNIT_SYSTEM_AVOIDANCE = 103,
786    FAILURE_UNIT_SYSTEM_RC_SIGNAL = 104,
787    FAILURE_UNIT_SYSTEM_MAVLINK_SIGNAL = 105,
788}
789impl FailureUnit {
790    pub const DEFAULT: Self = Self::FAILURE_UNIT_SENSOR_GYRO;
791}
792impl Default for FailureUnit {
793    fn default() -> Self {
794        Self::DEFAULT
795    }
796}
797#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
798#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
799#[cfg_attr(feature = "serde", serde(tag = "type"))]
800#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
801#[repr(u32)]
802pub enum FenceBreach {
803    #[doc = "No last fence breach"]
804    FENCE_BREACH_NONE = 0,
805    #[doc = "Breached minimum altitude"]
806    FENCE_BREACH_MINALT = 1,
807    #[doc = "Breached maximum altitude"]
808    FENCE_BREACH_MAXALT = 2,
809    #[doc = "Breached fence boundary"]
810    FENCE_BREACH_BOUNDARY = 3,
811}
812impl FenceBreach {
813    pub const DEFAULT: Self = Self::FENCE_BREACH_NONE;
814}
815impl Default for FenceBreach {
816    fn default() -> Self {
817        Self::DEFAULT
818    }
819}
820#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
821#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
822#[cfg_attr(feature = "serde", serde(tag = "type"))]
823#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
824#[repr(u32)]
825#[doc = "Actions being taken to mitigate/prevent fence breach"]
826pub enum FenceMitigate {
827    #[doc = "Unknown"]
828    FENCE_MITIGATE_UNKNOWN = 0,
829    #[doc = "No actions being taken"]
830    FENCE_MITIGATE_NONE = 1,
831    #[doc = "Velocity limiting active to prevent breach"]
832    FENCE_MITIGATE_VEL_LIMIT = 2,
833}
834impl FenceMitigate {
835    pub const DEFAULT: Self = Self::FENCE_MITIGATE_UNKNOWN;
836}
837impl Default for FenceMitigate {
838    fn default() -> Self {
839        Self::DEFAULT
840    }
841}
842#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
843#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
844#[cfg_attr(feature = "serde", serde(tag = "type"))]
845#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
846#[repr(u32)]
847#[doc = "Fence types to enable or disable when using MAV_CMD_DO_FENCE_ENABLE.         Note that at least one of these flags must be set in MAV_CMD_DO_FENCE_ENABLE.param2.         If none are set, the flight stack will ignore the field and enable/disable its default set of fences (usually all of them)."]
848pub enum FenceType {
849    #[doc = "Maximum altitude fence"]
850    FENCE_TYPE_ALT_MAX = 1,
851    #[doc = "Circle fence"]
852    FENCE_TYPE_CIRCLE = 2,
853    #[doc = "Polygon fence"]
854    FENCE_TYPE_POLYGON = 4,
855    #[doc = "Minimum altitude fence"]
856    FENCE_TYPE_ALT_MIN = 8,
857}
858impl FenceType {
859    pub const DEFAULT: Self = Self::FENCE_TYPE_ALT_MAX;
860}
861impl Default for FenceType {
862    fn default() -> Self {
863        Self::DEFAULT
864    }
865}
866#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
867#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
868#[cfg_attr(feature = "serde", serde(tag = "type"))]
869#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
870#[repr(u32)]
871#[doc = "These values define the type of firmware release.  These values indicate the first version or release of this type.  For example the first alpha release would be 64, the second would be 65."]
872pub enum FirmwareVersionType {
873    #[doc = "development release"]
874    FIRMWARE_VERSION_TYPE_DEV = 0,
875    #[doc = "alpha release"]
876    FIRMWARE_VERSION_TYPE_ALPHA = 64,
877    #[doc = "beta release"]
878    FIRMWARE_VERSION_TYPE_BETA = 128,
879    #[doc = "release candidate"]
880    FIRMWARE_VERSION_TYPE_RC = 192,
881    #[doc = "official stable release"]
882    FIRMWARE_VERSION_TYPE_OFFICIAL = 255,
883}
884impl FirmwareVersionType {
885    pub const DEFAULT: Self = Self::FIRMWARE_VERSION_TYPE_DEV;
886}
887impl Default for FirmwareVersionType {
888    fn default() -> Self {
889        Self::DEFAULT
890    }
891}
892bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Gimbal device (low level) capability flags (bitmap)."] pub struct GimbalDeviceCapFlags : u16 { # [doc = "Gimbal device supports a retracted position."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_RETRACT = 1 ; # [doc = "Gimbal device supports a horizontal, forward looking position, stabilized."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_NEUTRAL = 2 ; # [doc = "Gimbal device supports rotating around roll axis."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_AXIS = 4 ; # [doc = "Gimbal device supports to follow a roll angle relative to the vehicle."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_FOLLOW = 8 ; # [doc = "Gimbal device supports locking to a roll angle (generally that's the default with roll stabilized)."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_LOCK = 16 ; # [doc = "Gimbal device supports rotating around pitch axis."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_AXIS = 32 ; # [doc = "Gimbal device supports to follow a pitch angle relative to the vehicle."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_FOLLOW = 64 ; # [doc = "Gimbal device supports locking to a pitch angle (generally that's the default with pitch stabilized)."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_LOCK = 128 ; # [doc = "Gimbal device supports rotating around yaw axis."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_AXIS = 256 ; # [doc = "Gimbal device supports to follow a yaw angle relative to the vehicle (generally that's the default)."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_FOLLOW = 512 ; # [doc = "Gimbal device supports locking to an absolute heading, i.e., yaw angle relative to North (earth frame, often this is an option available)."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_LOCK = 1024 ; # [doc = "Gimbal device supports yawing/panning infinitely (e.g. using slip disk)."] const GIMBAL_DEVICE_CAP_FLAGS_SUPPORTS_INFINITE_YAW = 2048 ; # [doc = "Gimbal device supports yaw angles and angular velocities relative to North (earth frame). This usually requires support by an autopilot via AUTOPILOT_STATE_FOR_GIMBAL_DEVICE. Support can go on and off during runtime, which is reported by the flag GIMBAL_DEVICE_FLAGS_CAN_ACCEPT_YAW_IN_EARTH_FRAME."] const GIMBAL_DEVICE_CAP_FLAGS_SUPPORTS_YAW_IN_EARTH_FRAME = 4096 ; # [doc = "Gimbal device supports radio control inputs as an alternative input for controlling the gimbal orientation."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_RC_INPUTS = 8192 ; } }
893impl GimbalDeviceCapFlags {
894    pub const DEFAULT: Self = Self::GIMBAL_DEVICE_CAP_FLAGS_HAS_RETRACT;
895}
896impl Default for GimbalDeviceCapFlags {
897    fn default() -> Self {
898        Self::DEFAULT
899    }
900}
901bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Gimbal device (low level) error flags (bitmap, 0 means no error)"] pub struct GimbalDeviceErrorFlags : u32 { # [doc = "Gimbal device is limited by hardware roll limit."] const GIMBAL_DEVICE_ERROR_FLAGS_AT_ROLL_LIMIT = 1 ; # [doc = "Gimbal device is limited by hardware pitch limit."] const GIMBAL_DEVICE_ERROR_FLAGS_AT_PITCH_LIMIT = 2 ; # [doc = "Gimbal device is limited by hardware yaw limit."] const GIMBAL_DEVICE_ERROR_FLAGS_AT_YAW_LIMIT = 4 ; # [doc = "There is an error with the gimbal encoders."] const GIMBAL_DEVICE_ERROR_FLAGS_ENCODER_ERROR = 8 ; # [doc = "There is an error with the gimbal power source."] const GIMBAL_DEVICE_ERROR_FLAGS_POWER_ERROR = 16 ; # [doc = "There is an error with the gimbal motors."] const GIMBAL_DEVICE_ERROR_FLAGS_MOTOR_ERROR = 32 ; # [doc = "There is an error with the gimbal's software."] const GIMBAL_DEVICE_ERROR_FLAGS_SOFTWARE_ERROR = 64 ; # [doc = "There is an error with the gimbal's communication."] const GIMBAL_DEVICE_ERROR_FLAGS_COMMS_ERROR = 128 ; # [doc = "Gimbal device is currently calibrating."] const GIMBAL_DEVICE_ERROR_FLAGS_CALIBRATION_RUNNING = 256 ; # [doc = "Gimbal device is not assigned to a gimbal manager."] const GIMBAL_DEVICE_ERROR_FLAGS_NO_MANAGER = 512 ; } }
902impl GimbalDeviceErrorFlags {
903    pub const DEFAULT: Self = Self::GIMBAL_DEVICE_ERROR_FLAGS_AT_ROLL_LIMIT;
904}
905impl Default for GimbalDeviceErrorFlags {
906    fn default() -> Self {
907        Self::DEFAULT
908    }
909}
910bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags for gimbal device (lower level) operation."] pub struct GimbalDeviceFlags : u16 { # [doc = "Set to retracted safe position (no stabilization), takes precedence over all other flags."] const GIMBAL_DEVICE_FLAGS_RETRACT = 1 ; # [doc = "Set to neutral/default position, taking precedence over all other flags except RETRACT. Neutral is commonly forward-facing and horizontal (roll=pitch=yaw=0) but may be any orientation."] const GIMBAL_DEVICE_FLAGS_NEUTRAL = 2 ; # [doc = "Lock roll angle to absolute angle relative to horizon (not relative to vehicle). This is generally the default with a stabilizing gimbal."] const GIMBAL_DEVICE_FLAGS_ROLL_LOCK = 4 ; # [doc = "Lock pitch angle to absolute angle relative to horizon (not relative to vehicle). This is generally the default with a stabilizing gimbal."] const GIMBAL_DEVICE_FLAGS_PITCH_LOCK = 8 ; # [doc = "Lock yaw angle to absolute angle relative to North (not relative to vehicle). If this flag is set, the yaw angle and z component of angular velocity are relative to North (earth frame, x-axis pointing North), else they are relative to the vehicle heading (vehicle frame, earth frame rotated so that the x-axis is pointing forward)."] const GIMBAL_DEVICE_FLAGS_YAW_LOCK = 16 ; # [doc = "Yaw angle and z component of angular velocity are relative to the vehicle heading (vehicle frame, earth frame rotated such that the x-axis is pointing forward)."] const GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME = 32 ; # [doc = "Yaw angle and z component of angular velocity are relative to North (earth frame, x-axis is pointing North)."] const GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME = 64 ; # [doc = "Gimbal device can accept yaw angle inputs relative to North (earth frame). This flag is only for reporting (attempts to set this flag are ignored)."] const GIMBAL_DEVICE_FLAGS_ACCEPTS_YAW_IN_EARTH_FRAME = 128 ; # [doc = "The gimbal orientation is set exclusively by the RC signals feed to the gimbal's radio control inputs. MAVLink messages for setting the gimbal orientation (GIMBAL_DEVICE_SET_ATTITUDE) are ignored."] const GIMBAL_DEVICE_FLAGS_RC_EXCLUSIVE = 256 ; # [doc = "The gimbal orientation is determined by combining/mixing the RC signals feed to the gimbal's radio control inputs and the MAVLink messages for setting the gimbal orientation (GIMBAL_DEVICE_SET_ATTITUDE). How these two controls are combined or mixed is not defined by the protocol but is up to the implementation."] const GIMBAL_DEVICE_FLAGS_RC_MIXED = 512 ; } }
911impl GimbalDeviceFlags {
912    pub const DEFAULT: Self = Self::GIMBAL_DEVICE_FLAGS_RETRACT;
913}
914impl Default for GimbalDeviceFlags {
915    fn default() -> Self {
916        Self::DEFAULT
917    }
918}
919bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Gimbal manager high level capability flags (bitmap). The first 16 bits are identical to the GIMBAL_DEVICE_CAP_FLAGS. However, the gimbal manager does not need to copy the flags from the gimbal but can also enhance the capabilities and thus add flags."] pub struct GimbalManagerCapFlags : u32 { # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_RETRACT."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_RETRACT = 1 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_NEUTRAL."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_NEUTRAL = 2 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_AXIS."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_ROLL_AXIS = 4 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_FOLLOW."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_ROLL_FOLLOW = 8 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_LOCK."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_ROLL_LOCK = 16 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_AXIS."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_PITCH_AXIS = 32 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_FOLLOW."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_PITCH_FOLLOW = 64 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_LOCK."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_PITCH_LOCK = 128 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_AXIS."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_YAW_AXIS = 256 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_FOLLOW."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_YAW_FOLLOW = 512 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_LOCK."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_YAW_LOCK = 1024 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_SUPPORTS_INFINITE_YAW."] const GIMBAL_MANAGER_CAP_FLAGS_SUPPORTS_INFINITE_YAW = 2048 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_SUPPORTS_YAW_IN_EARTH_FRAME."] const GIMBAL_MANAGER_CAP_FLAGS_SUPPORTS_YAW_IN_EARTH_FRAME = 4096 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_RC_INPUTS."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_RC_INPUTS = 8192 ; # [doc = "Gimbal manager supports to point to a local position."] const GIMBAL_MANAGER_CAP_FLAGS_CAN_POINT_LOCATION_LOCAL = 65536 ; # [doc = "Gimbal manager supports to point to a global latitude, longitude, altitude position."] const GIMBAL_MANAGER_CAP_FLAGS_CAN_POINT_LOCATION_GLOBAL = 131072 ; } }
920impl GimbalManagerCapFlags {
921    pub const DEFAULT: Self = Self::GIMBAL_MANAGER_CAP_FLAGS_HAS_RETRACT;
922}
923impl Default for GimbalManagerCapFlags {
924    fn default() -> Self {
925        Self::DEFAULT
926    }
927}
928bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags for high level gimbal manager operation The first 16 bits are identical to the GIMBAL_DEVICE_FLAGS."] pub struct GimbalManagerFlags : u32 { # [doc = "Based on GIMBAL_DEVICE_FLAGS_RETRACT."] const GIMBAL_MANAGER_FLAGS_RETRACT = 1 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_NEUTRAL."] const GIMBAL_MANAGER_FLAGS_NEUTRAL = 2 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_ROLL_LOCK."] const GIMBAL_MANAGER_FLAGS_ROLL_LOCK = 4 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_PITCH_LOCK."] const GIMBAL_MANAGER_FLAGS_PITCH_LOCK = 8 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_YAW_LOCK."] const GIMBAL_MANAGER_FLAGS_YAW_LOCK = 16 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME."] const GIMBAL_MANAGER_FLAGS_YAW_IN_VEHICLE_FRAME = 32 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME."] const GIMBAL_MANAGER_FLAGS_YAW_IN_EARTH_FRAME = 64 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_ACCEPTS_YAW_IN_EARTH_FRAME."] const GIMBAL_MANAGER_FLAGS_ACCEPTS_YAW_IN_EARTH_FRAME = 128 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_RC_EXCLUSIVE."] const GIMBAL_MANAGER_FLAGS_RC_EXCLUSIVE = 256 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_RC_MIXED."] const GIMBAL_MANAGER_FLAGS_RC_MIXED = 512 ; } }
929impl GimbalManagerFlags {
930    pub const DEFAULT: Self = Self::GIMBAL_MANAGER_FLAGS_RETRACT;
931}
932impl Default for GimbalManagerFlags {
933    fn default() -> Self {
934        Self::DEFAULT
935    }
936}
937#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
938#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
939#[cfg_attr(feature = "serde", serde(tag = "type"))]
940#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
941#[repr(u32)]
942#[doc = "Type of GPS fix"]
943pub enum GpsFixType {
944    #[doc = "No GPS connected"]
945    GPS_FIX_TYPE_NO_GPS = 0,
946    #[doc = "No position information, GPS is connected"]
947    GPS_FIX_TYPE_NO_FIX = 1,
948    #[doc = "2D position"]
949    GPS_FIX_TYPE_2D_FIX = 2,
950    #[doc = "3D position"]
951    GPS_FIX_TYPE_3D_FIX = 3,
952    #[doc = "DGPS/SBAS aided 3D position"]
953    GPS_FIX_TYPE_DGPS = 4,
954    #[doc = "RTK float, 3D position"]
955    GPS_FIX_TYPE_RTK_FLOAT = 5,
956    #[doc = "RTK Fixed, 3D position"]
957    GPS_FIX_TYPE_RTK_FIXED = 6,
958    #[doc = "Static fixed, typically used for base stations"]
959    GPS_FIX_TYPE_STATIC = 7,
960    #[doc = "PPP, 3D position."]
961    GPS_FIX_TYPE_PPP = 8,
962}
963impl GpsFixType {
964    pub const DEFAULT: Self = Self::GPS_FIX_TYPE_NO_GPS;
965}
966impl Default for GpsFixType {
967    fn default() -> Self {
968        Self::DEFAULT
969    }
970}
971bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] pub struct GpsInputIgnoreFlags : u16 { # [doc = "ignore altitude field"] const GPS_INPUT_IGNORE_FLAG_ALT = 1 ; # [doc = "ignore hdop field"] const GPS_INPUT_IGNORE_FLAG_HDOP = 2 ; # [doc = "ignore vdop field"] const GPS_INPUT_IGNORE_FLAG_VDOP = 4 ; # [doc = "ignore horizontal velocity field (vn and ve)"] const GPS_INPUT_IGNORE_FLAG_VEL_HORIZ = 8 ; # [doc = "ignore vertical velocity field (vd)"] const GPS_INPUT_IGNORE_FLAG_VEL_VERT = 16 ; # [doc = "ignore speed accuracy field"] const GPS_INPUT_IGNORE_FLAG_SPEED_ACCURACY = 32 ; # [doc = "ignore horizontal accuracy field"] const GPS_INPUT_IGNORE_FLAG_HORIZONTAL_ACCURACY = 64 ; # [doc = "ignore vertical accuracy field"] const GPS_INPUT_IGNORE_FLAG_VERTICAL_ACCURACY = 128 ; } }
972impl GpsInputIgnoreFlags {
973    pub const DEFAULT: Self = Self::GPS_INPUT_IGNORE_FLAG_ALT;
974}
975impl Default for GpsInputIgnoreFlags {
976    fn default() -> Self {
977        Self::DEFAULT
978    }
979}
980#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
981#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
982#[cfg_attr(feature = "serde", serde(tag = "type"))]
983#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
984#[repr(u32)]
985#[doc = "Gripper actions."]
986pub enum GripperActions {
987    #[doc = "Gripper release cargo."]
988    GRIPPER_ACTION_RELEASE = 0,
989    #[doc = "Gripper grab onto cargo."]
990    GRIPPER_ACTION_GRAB = 1,
991}
992impl GripperActions {
993    pub const DEFAULT: Self = Self::GRIPPER_ACTION_RELEASE;
994}
995impl Default for GripperActions {
996    fn default() -> Self {
997        Self::DEFAULT
998    }
999}
1000#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1001#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1002#[cfg_attr(feature = "serde", serde(tag = "type"))]
1003#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1004#[repr(u32)]
1005pub enum GsmLinkType {
1006    #[doc = "no service"]
1007    GSM_LINK_TYPE_NONE = 0,
1008    #[doc = "link type unknown"]
1009    GSM_LINK_TYPE_UNKNOWN = 1,
1010    #[doc = "2G (GSM/GRPS/EDGE) link"]
1011    GSM_LINK_TYPE_2G = 2,
1012    #[doc = "3G link (WCDMA/HSDPA/HSPA)"]
1013    GSM_LINK_TYPE_3G = 3,
1014    #[doc = "4G link (LTE)"]
1015    GSM_LINK_TYPE_4G = 4,
1016}
1017impl GsmLinkType {
1018    pub const DEFAULT: Self = Self::GSM_LINK_TYPE_NONE;
1019}
1020impl Default for GsmLinkType {
1021    fn default() -> Self {
1022        Self::DEFAULT
1023    }
1024}
1025#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1026#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1027#[cfg_attr(feature = "serde", serde(tag = "type"))]
1028#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1029#[repr(u32)]
1030pub enum GsmModemType {
1031    #[doc = "not specified"]
1032    GSM_MODEM_TYPE_UNKNOWN = 0,
1033    #[doc = "HUAWEI LTE USB Stick E3372"]
1034    GSM_MODEM_TYPE_HUAWEI_E3372 = 1,
1035}
1036impl GsmModemType {
1037    pub const DEFAULT: Self = Self::GSM_MODEM_TYPE_UNKNOWN;
1038}
1039impl Default for GsmModemType {
1040    fn default() -> Self {
1041        Self::DEFAULT
1042    }
1043}
1044bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags in the HIGHRES_IMU message indicate which fields have updated since the last message"] pub struct HighresImuUpdatedFlags : u16 { # [doc = "The value in the xacc field has been updated"] const HIGHRES_IMU_UPDATED_XACC = 1 ; # [doc = "The value in the yacc field has been updated"] const HIGHRES_IMU_UPDATED_YACC = 2 ; # [doc = "The value in the zacc field has been updated since"] const HIGHRES_IMU_UPDATED_ZACC = 4 ; # [doc = "The value in the xgyro field has been updated"] const HIGHRES_IMU_UPDATED_XGYRO = 8 ; # [doc = "The value in the ygyro field has been updated"] const HIGHRES_IMU_UPDATED_YGYRO = 16 ; # [doc = "The value in the zgyro field has been updated"] const HIGHRES_IMU_UPDATED_ZGYRO = 32 ; # [doc = "The value in the xmag field has been updated"] const HIGHRES_IMU_UPDATED_XMAG = 64 ; # [doc = "The value in the ymag field has been updated"] const HIGHRES_IMU_UPDATED_YMAG = 128 ; # [doc = "The value in the zmag field has been updated"] const HIGHRES_IMU_UPDATED_ZMAG = 256 ; # [doc = "The value in the abs_pressure field has been updated"] const HIGHRES_IMU_UPDATED_ABS_PRESSURE = 512 ; # [doc = "The value in the diff_pressure field has been updated"] const HIGHRES_IMU_UPDATED_DIFF_PRESSURE = 1024 ; # [doc = "The value in the pressure_alt field has been updated"] const HIGHRES_IMU_UPDATED_PRESSURE_ALT = 2048 ; # [doc = "The value in the temperature field has been updated"] const HIGHRES_IMU_UPDATED_TEMPERATURE = 4096 ; } }
1045impl HighresImuUpdatedFlags {
1046    pub const DEFAULT: Self = Self::HIGHRES_IMU_UPDATED_XACC;
1047}
1048impl Default for HighresImuUpdatedFlags {
1049    fn default() -> Self {
1050        Self::DEFAULT
1051    }
1052}
1053bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags used in HIL_ACTUATOR_CONTROLS message."] pub struct HilActuatorControlsFlags : u64 { # [doc = "Simulation is using lockstep"] const HIL_ACTUATOR_CONTROLS_FLAGS_LOCKSTEP = 1 ; } }
1054impl HilActuatorControlsFlags {
1055    pub const DEFAULT: Self = Self::HIL_ACTUATOR_CONTROLS_FLAGS_LOCKSTEP;
1056}
1057impl Default for HilActuatorControlsFlags {
1058    fn default() -> Self {
1059        Self::DEFAULT
1060    }
1061}
1062bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags in the HIL_SENSOR message indicate which fields have updated since the last message"] pub struct HilSensorUpdatedFlags : u32 { # [doc = "The value in the xacc field has been updated"] const HIL_SENSOR_UPDATED_XACC = 1 ; # [doc = "The value in the yacc field has been updated"] const HIL_SENSOR_UPDATED_YACC = 2 ; # [doc = "The value in the zacc field has been updated"] const HIL_SENSOR_UPDATED_ZACC = 4 ; # [doc = "The value in the xgyro field has been updated"] const HIL_SENSOR_UPDATED_XGYRO = 8 ; # [doc = "The value in the ygyro field has been updated"] const HIL_SENSOR_UPDATED_YGYRO = 16 ; # [doc = "The value in the zgyro field has been updated"] const HIL_SENSOR_UPDATED_ZGYRO = 32 ; # [doc = "The value in the xmag field has been updated"] const HIL_SENSOR_UPDATED_XMAG = 64 ; # [doc = "The value in the ymag field has been updated"] const HIL_SENSOR_UPDATED_YMAG = 128 ; # [doc = "The value in the zmag field has been updated"] const HIL_SENSOR_UPDATED_ZMAG = 256 ; # [doc = "The value in the abs_pressure field has been updated"] const HIL_SENSOR_UPDATED_ABS_PRESSURE = 512 ; # [doc = "The value in the diff_pressure field has been updated"] const HIL_SENSOR_UPDATED_DIFF_PRESSURE = 1024 ; # [doc = "The value in the pressure_alt field has been updated"] const HIL_SENSOR_UPDATED_PRESSURE_ALT = 2048 ; # [doc = "The value in the temperature field has been updated"] const HIL_SENSOR_UPDATED_TEMPERATURE = 4096 ; # [doc = "Full reset of attitude/position/velocities/etc was performed in sim (Bit 31)."] const HIL_SENSOR_UPDATED_RESET = 2147483648 ; } }
1063impl HilSensorUpdatedFlags {
1064    pub const DEFAULT: Self = Self::HIL_SENSOR_UPDATED_XACC;
1065}
1066impl Default for HilSensorUpdatedFlags {
1067    fn default() -> Self {
1068        Self::DEFAULT
1069    }
1070}
1071bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags to report failure cases over the high latency telemetry."] pub struct HlFailureFlag : u16 { # [doc = "GPS failure."] const HL_FAILURE_FLAG_GPS = 1 ; # [doc = "Differential pressure sensor failure."] const HL_FAILURE_FLAG_DIFFERENTIAL_PRESSURE = 2 ; # [doc = "Absolute pressure sensor failure."] const HL_FAILURE_FLAG_ABSOLUTE_PRESSURE = 4 ; # [doc = "Accelerometer sensor failure."] const HL_FAILURE_FLAG_3D_ACCEL = 8 ; # [doc = "Gyroscope sensor failure."] const HL_FAILURE_FLAG_3D_GYRO = 16 ; # [doc = "Magnetometer sensor failure."] const HL_FAILURE_FLAG_3D_MAG = 32 ; # [doc = "Terrain subsystem failure."] const HL_FAILURE_FLAG_TERRAIN = 64 ; # [doc = "Battery failure/critical low battery."] const HL_FAILURE_FLAG_BATTERY = 128 ; # [doc = "RC receiver failure/no RC connection."] const HL_FAILURE_FLAG_RC_RECEIVER = 256 ; # [doc = "Offboard link failure."] const HL_FAILURE_FLAG_OFFBOARD_LINK = 512 ; # [doc = "Engine failure."] const HL_FAILURE_FLAG_ENGINE = 1024 ; # [doc = "Geofence violation."] const HL_FAILURE_FLAG_GEOFENCE = 2048 ; # [doc = "Estimator failure, for example measurement rejection or large variances."] const HL_FAILURE_FLAG_ESTIMATOR = 4096 ; # [doc = "Mission failure."] const HL_FAILURE_FLAG_MISSION = 8192 ; } }
1072impl HlFailureFlag {
1073    pub const DEFAULT: Self = Self::HL_FAILURE_FLAG_GPS;
1074}
1075impl Default for HlFailureFlag {
1076    fn default() -> Self {
1077        Self::DEFAULT
1078    }
1079}
1080bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Illuminator module error flags (bitmap, 0 means no error)"] pub struct IlluminatorErrorFlags : u32 { # [doc = "Illuminator thermal throttling error."] const ILLUMINATOR_ERROR_FLAGS_THERMAL_THROTTLING = 1 ; # [doc = "Illuminator over temperature shutdown error."] const ILLUMINATOR_ERROR_FLAGS_OVER_TEMPERATURE_SHUTDOWN = 2 ; # [doc = "Illuminator thermistor failure."] const ILLUMINATOR_ERROR_FLAGS_THERMISTOR_FAILURE = 4 ; } }
1081impl IlluminatorErrorFlags {
1082    pub const DEFAULT: Self = Self::ILLUMINATOR_ERROR_FLAGS_THERMAL_THROTTLING;
1083}
1084impl Default for IlluminatorErrorFlags {
1085    fn default() -> Self {
1086        Self::DEFAULT
1087    }
1088}
1089#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1090#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1091#[cfg_attr(feature = "serde", serde(tag = "type"))]
1092#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1093#[repr(u32)]
1094#[doc = "Modes of illuminator"]
1095pub enum IlluminatorMode {
1096    #[doc = "Illuminator mode is not specified/unknown"]
1097    ILLUMINATOR_MODE_UNKNOWN = 0,
1098    #[doc = "Illuminator behavior is controlled by MAV_CMD_DO_ILLUMINATOR_CONFIGURE settings"]
1099    ILLUMINATOR_MODE_INTERNAL_CONTROL = 1,
1100    #[doc = "Illuminator behavior is controlled by external factors: e.g. an external hardware signal"]
1101    ILLUMINATOR_MODE_EXTERNAL_SYNC = 2,
1102}
1103impl IlluminatorMode {
1104    pub const DEFAULT: Self = Self::ILLUMINATOR_MODE_UNKNOWN;
1105}
1106impl Default for IlluminatorMode {
1107    fn default() -> Self {
1108        Self::DEFAULT
1109    }
1110}
1111#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1112#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1113#[cfg_attr(feature = "serde", serde(tag = "type"))]
1114#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1115#[repr(u32)]
1116#[doc = "Type of landing target"]
1117pub enum LandingTargetType {
1118    #[doc = "Landing target signaled by light beacon (ex: IR-LOCK)"]
1119    LANDING_TARGET_TYPE_LIGHT_BEACON = 0,
1120    #[doc = "Landing target signaled by radio beacon (ex: ILS, NDB)"]
1121    LANDING_TARGET_TYPE_RADIO_BEACON = 1,
1122    #[doc = "Landing target represented by a fiducial marker (ex: ARTag)"]
1123    LANDING_TARGET_TYPE_VISION_FIDUCIAL = 2,
1124    #[doc = "Landing target represented by a pre-defined visual shape/feature (ex: X-marker, H-marker, square)"]
1125    LANDING_TARGET_TYPE_VISION_OTHER = 3,
1126}
1127impl LandingTargetType {
1128    pub const DEFAULT: Self = Self::LANDING_TARGET_TYPE_LIGHT_BEACON;
1129}
1130impl Default for LandingTargetType {
1131    fn default() -> Self {
1132        Self::DEFAULT
1133    }
1134}
1135#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1136#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1137#[cfg_attr(feature = "serde", serde(tag = "type"))]
1138#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1139#[repr(u32)]
1140pub enum MagCalStatus {
1141    MAG_CAL_NOT_STARTED = 0,
1142    MAG_CAL_WAITING_TO_START = 1,
1143    MAG_CAL_RUNNING_STEP_ONE = 2,
1144    MAG_CAL_RUNNING_STEP_TWO = 3,
1145    MAG_CAL_SUCCESS = 4,
1146    MAG_CAL_FAILED = 5,
1147    MAG_CAL_BAD_ORIENTATION = 6,
1148    MAG_CAL_BAD_RADIUS = 7,
1149}
1150impl MagCalStatus {
1151    pub const DEFAULT: Self = Self::MAG_CAL_NOT_STARTED;
1152}
1153impl Default for MagCalStatus {
1154    fn default() -> Self {
1155        Self::DEFAULT
1156    }
1157}
1158#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1159#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1160#[cfg_attr(feature = "serde", serde(tag = "type"))]
1161#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1162#[repr(u32)]
1163pub enum MavArmAuthDeniedReason {
1164    #[doc = "Not a specific reason"]
1165    MAV_ARM_AUTH_DENIED_REASON_GENERIC = 0,
1166    #[doc = "Authorizer will send the error as string to GCS"]
1167    MAV_ARM_AUTH_DENIED_REASON_NONE = 1,
1168    #[doc = "At least one waypoint have a invalid value"]
1169    MAV_ARM_AUTH_DENIED_REASON_INVALID_WAYPOINT = 2,
1170    #[doc = "Timeout in the authorizer process(in case it depends on network)"]
1171    MAV_ARM_AUTH_DENIED_REASON_TIMEOUT = 3,
1172    #[doc = "Airspace of the mission in use by another vehicle, second result parameter can have the waypoint id that caused it to be denied."]
1173    MAV_ARM_AUTH_DENIED_REASON_AIRSPACE_IN_USE = 4,
1174    #[doc = "Weather is not good to fly"]
1175    MAV_ARM_AUTH_DENIED_REASON_BAD_WEATHER = 5,
1176}
1177impl MavArmAuthDeniedReason {
1178    pub const DEFAULT: Self = Self::MAV_ARM_AUTH_DENIED_REASON_GENERIC;
1179}
1180impl Default for MavArmAuthDeniedReason {
1181    fn default() -> Self {
1182        Self::DEFAULT
1183    }
1184}
1185#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1186#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1187#[cfg_attr(feature = "serde", serde(tag = "type"))]
1188#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1189#[repr(u32)]
1190#[doc = "Micro air vehicle / autopilot classes. This identifies the individual model."]
1191pub enum MavAutopilot {
1192    #[doc = "Generic autopilot, full support for everything"]
1193    MAV_AUTOPILOT_GENERIC = 0,
1194    #[doc = "Reserved for future use."]
1195    MAV_AUTOPILOT_RESERVED = 1,
1196    #[doc = "SLUGS autopilot, <http://slugsuav.soe.ucsc.edu>"]
1197    MAV_AUTOPILOT_SLUGS = 2,
1198    #[doc = "ArduPilot - Plane/Copter/Rover/Sub/Tracker, <https://ardupilot.org>"]
1199    MAV_AUTOPILOT_ARDUPILOTMEGA = 3,
1200    #[doc = "OpenPilot, <http://openpilot.org>"]
1201    MAV_AUTOPILOT_OPENPILOT = 4,
1202    #[doc = "Generic autopilot only supporting simple waypoints"]
1203    MAV_AUTOPILOT_GENERIC_WAYPOINTS_ONLY = 5,
1204    #[doc = "Generic autopilot supporting waypoints and other simple navigation commands"]
1205    MAV_AUTOPILOT_GENERIC_WAYPOINTS_AND_SIMPLE_NAVIGATION_ONLY = 6,
1206    #[doc = "Generic autopilot supporting the full mission command set"]
1207    MAV_AUTOPILOT_GENERIC_MISSION_FULL = 7,
1208    #[doc = "No valid autopilot, e.g. a GCS or other MAVLink component"]
1209    MAV_AUTOPILOT_INVALID = 8,
1210    #[doc = "PPZ UAV - <http://nongnu.org/paparazzi>"]
1211    MAV_AUTOPILOT_PPZ = 9,
1212    #[doc = "UAV Dev Board"]
1213    MAV_AUTOPILOT_UDB = 10,
1214    #[doc = "FlexiPilot"]
1215    MAV_AUTOPILOT_FP = 11,
1216    #[doc = "PX4 Autopilot - <http://px4.io/>"]
1217    MAV_AUTOPILOT_PX4 = 12,
1218    #[doc = "SMACCMPilot - <http://smaccmpilot.org>"]
1219    MAV_AUTOPILOT_SMACCMPILOT = 13,
1220    #[doc = "AutoQuad -- <http://autoquad.org>"]
1221    MAV_AUTOPILOT_AUTOQUAD = 14,
1222    #[doc = "Armazila -- <http://armazila.com>"]
1223    MAV_AUTOPILOT_ARMAZILA = 15,
1224    #[doc = "Aerob -- <http://aerob.ru>"]
1225    MAV_AUTOPILOT_AEROB = 16,
1226    #[doc = "ASLUAV autopilot -- <http://www.asl.ethz.ch>"]
1227    MAV_AUTOPILOT_ASLUAV = 17,
1228    #[doc = "SmartAP Autopilot - <http://sky-drones.com>"]
1229    MAV_AUTOPILOT_SMARTAP = 18,
1230    #[doc = "AirRails - <http://uaventure.com>"]
1231    MAV_AUTOPILOT_AIRRAILS = 19,
1232    #[doc = "Fusion Reflex - <https://fusion.engineering>"]
1233    MAV_AUTOPILOT_REFLEX = 20,
1234}
1235impl MavAutopilot {
1236    pub const DEFAULT: Self = Self::MAV_AUTOPILOT_GENERIC;
1237}
1238impl Default for MavAutopilot {
1239    fn default() -> Self {
1240        Self::DEFAULT
1241    }
1242}
1243#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1244#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1245#[cfg_attr(feature = "serde", serde(tag = "type"))]
1246#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1247#[repr(u32)]
1248#[doc = "Enumeration for battery charge states."]
1249pub enum MavBatteryChargeState {
1250    #[doc = "Low battery state is not provided"]
1251    MAV_BATTERY_CHARGE_STATE_UNDEFINED = 0,
1252    #[doc = "Battery is not in low state. Normal operation."]
1253    MAV_BATTERY_CHARGE_STATE_OK = 1,
1254    #[doc = "Battery state is low, warn and monitor close."]
1255    MAV_BATTERY_CHARGE_STATE_LOW = 2,
1256    #[doc = "Battery state is critical, return or abort immediately."]
1257    MAV_BATTERY_CHARGE_STATE_CRITICAL = 3,
1258    #[doc = "Battery state is too low for ordinary abort sequence. Perform fastest possible emergency stop to prevent damage."]
1259    MAV_BATTERY_CHARGE_STATE_EMERGENCY = 4,
1260    #[doc = "Battery failed, damage unavoidable. Possible causes (faults) are listed in MAV_BATTERY_FAULT."]
1261    MAV_BATTERY_CHARGE_STATE_FAILED = 5,
1262    #[doc = "Battery is diagnosed to be defective or an error occurred, usage is discouraged / prohibited. Possible causes (faults) are listed in MAV_BATTERY_FAULT."]
1263    MAV_BATTERY_CHARGE_STATE_UNHEALTHY = 6,
1264    #[doc = "Battery is charging."]
1265    MAV_BATTERY_CHARGE_STATE_CHARGING = 7,
1266}
1267impl MavBatteryChargeState {
1268    pub const DEFAULT: Self = Self::MAV_BATTERY_CHARGE_STATE_UNDEFINED;
1269}
1270impl Default for MavBatteryChargeState {
1271    fn default() -> Self {
1272        Self::DEFAULT
1273    }
1274}
1275bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Smart battery supply status/fault flags (bitmask) for health indication. The battery must also report either MAV_BATTERY_CHARGE_STATE_FAILED or MAV_BATTERY_CHARGE_STATE_UNHEALTHY if any of these are set."] pub struct MavBatteryFault : u32 { # [doc = "Battery has deep discharged."] const MAV_BATTERY_FAULT_DEEP_DISCHARGE = 1 ; # [doc = "Voltage spikes."] const MAV_BATTERY_FAULT_SPIKES = 2 ; # [doc = "One or more cells have failed. Battery should also report MAV_BATTERY_CHARGE_STATE_FAILE (and should not be used)."] const MAV_BATTERY_FAULT_CELL_FAIL = 4 ; # [doc = "Over-current fault."] const MAV_BATTERY_FAULT_OVER_CURRENT = 8 ; # [doc = "Over-temperature fault."] const MAV_BATTERY_FAULT_OVER_TEMPERATURE = 16 ; # [doc = "Under-temperature fault."] const MAV_BATTERY_FAULT_UNDER_TEMPERATURE = 32 ; # [doc = "Vehicle voltage is not compatible with this battery (batteries on same power rail should have similar voltage)."] const MAV_BATTERY_FAULT_INCOMPATIBLE_VOLTAGE = 64 ; # [doc = "Battery firmware is not compatible with current autopilot firmware."] const MAV_BATTERY_FAULT_INCOMPATIBLE_FIRMWARE = 128 ; # [doc = "Battery is not compatible due to cell configuration (e.g. 5s1p when vehicle requires 6s)."] const BATTERY_FAULT_INCOMPATIBLE_CELLS_CONFIGURATION = 256 ; } }
1276impl MavBatteryFault {
1277    pub const DEFAULT: Self = Self::MAV_BATTERY_FAULT_DEEP_DISCHARGE;
1278}
1279impl Default for MavBatteryFault {
1280    fn default() -> Self {
1281        Self::DEFAULT
1282    }
1283}
1284#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1285#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1286#[cfg_attr(feature = "serde", serde(tag = "type"))]
1287#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1288#[repr(u32)]
1289#[doc = "Enumeration of battery functions"]
1290pub enum MavBatteryFunction {
1291    #[doc = "Battery function is unknown"]
1292    MAV_BATTERY_FUNCTION_UNKNOWN = 0,
1293    #[doc = "Battery supports all flight systems"]
1294    MAV_BATTERY_FUNCTION_ALL = 1,
1295    #[doc = "Battery for the propulsion system"]
1296    MAV_BATTERY_FUNCTION_PROPULSION = 2,
1297    #[doc = "Avionics battery"]
1298    MAV_BATTERY_FUNCTION_AVIONICS = 3,
1299    #[doc = "Payload battery"]
1300    MAV_BATTERY_FUNCTION_PAYLOAD = 4,
1301}
1302impl MavBatteryFunction {
1303    pub const DEFAULT: Self = Self::MAV_BATTERY_FUNCTION_UNKNOWN;
1304}
1305impl Default for MavBatteryFunction {
1306    fn default() -> Self {
1307        Self::DEFAULT
1308    }
1309}
1310#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1311#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1312#[cfg_attr(feature = "serde", serde(tag = "type"))]
1313#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1314#[repr(u32)]
1315#[doc = "Battery mode. Note, the normal operation mode (i.e. when flying) should be reported as MAV_BATTERY_MODE_UNKNOWN to allow message trimming in normal flight."]
1316pub enum MavBatteryMode {
1317    #[doc = "Battery mode not supported/unknown battery mode/normal operation."]
1318    MAV_BATTERY_MODE_UNKNOWN = 0,
1319    #[doc = "Battery is auto discharging (towards storage level)."]
1320    MAV_BATTERY_MODE_AUTO_DISCHARGING = 1,
1321    #[doc = "Battery in hot-swap mode (current limited to prevent spikes that might damage sensitive electrical circuits)."]
1322    MAV_BATTERY_MODE_HOT_SWAP = 2,
1323}
1324impl MavBatteryMode {
1325    pub const DEFAULT: Self = Self::MAV_BATTERY_MODE_UNKNOWN;
1326}
1327impl Default for MavBatteryMode {
1328    fn default() -> Self {
1329        Self::DEFAULT
1330    }
1331}
1332#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1333#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1334#[cfg_attr(feature = "serde", serde(tag = "type"))]
1335#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1336#[repr(u32)]
1337#[doc = "Enumeration of battery types"]
1338pub enum MavBatteryType {
1339    #[doc = "Not specified."]
1340    MAV_BATTERY_TYPE_UNKNOWN = 0,
1341    #[doc = "Lithium polymer battery"]
1342    MAV_BATTERY_TYPE_LIPO = 1,
1343    #[doc = "Lithium-iron-phosphate battery"]
1344    MAV_BATTERY_TYPE_LIFE = 2,
1345    #[doc = "Lithium-ION battery"]
1346    MAV_BATTERY_TYPE_LION = 3,
1347    #[doc = "Nickel metal hydride battery"]
1348    MAV_BATTERY_TYPE_NIMH = 4,
1349}
1350impl MavBatteryType {
1351    pub const DEFAULT: Self = Self::MAV_BATTERY_TYPE_UNKNOWN;
1352}
1353impl Default for MavBatteryType {
1354    fn default() -> Self {
1355        Self::DEFAULT
1356    }
1357}
1358#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1359#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1360#[cfg_attr(feature = "serde", serde(tag = "type"))]
1361#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1362#[repr(u32)]
1363#[doc = "Commands to be executed by the MAV. They can be executed on user request, or as part of a mission script. If the action is used in a mission, the parameter mapping to the waypoint/mission message is as follows: Param 1, Param 2, Param 3, Param 4, X: Param 5, Y:Param 6, Z:Param 7. This command list is similar what ARINC 424 is for commercial aircraft: A data format how to interpret waypoint/mission data. NaN and INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current yaw or latitude rather than a specific value). See <https://mavlink.io/en/guide/xml_schema.html#MAV_CMD> for information about the structure of the MAV_CMD entries"]
1364pub enum MavCmd {
1365    #[doc = "Navigate to waypoint. This is intended for use in missions (for guided commands outside of missions use MAV_CMD_DO_REPOSITION)."]
1366    MAV_CMD_NAV_WAYPOINT = 16,
1367    #[doc = "Loiter around this waypoint an unlimited amount of time"]
1368    MAV_CMD_NAV_LOITER_UNLIM = 17,
1369    #[doc = "Loiter around this waypoint for X turns"]
1370    MAV_CMD_NAV_LOITER_TURNS = 18,
1371    #[doc = "Loiter at the specified latitude, longitude and altitude for a certain amount of time. Multicopter vehicles stop at the point (within a vehicle-specific acceptance radius). Forward-only moving vehicles (e.g. fixed-wing) circle the point with the specified radius/direction. If the Heading Required parameter (2) is non-zero forward moving aircraft will only leave the loiter circle once heading towards the next waypoint."]
1372    MAV_CMD_NAV_LOITER_TIME = 19,
1373    #[doc = "Return to launch location"]
1374    MAV_CMD_NAV_RETURN_TO_LAUNCH = 20,
1375    #[doc = "Land at location."]
1376    MAV_CMD_NAV_LAND = 21,
1377    #[doc = "Takeoff from ground / hand. Vehicles that support multiple takeoff modes (e.g. VTOL quadplane) should take off using the currently configured mode."]
1378    MAV_CMD_NAV_TAKEOFF = 22,
1379    #[doc = "Land at local position (local frame only)"]
1380    MAV_CMD_NAV_LAND_LOCAL = 23,
1381    #[doc = "Takeoff from local position (local frame only)"]
1382    MAV_CMD_NAV_TAKEOFF_LOCAL = 24,
1383    #[doc = "Vehicle following, i.e. this waypoint represents the position of a moving vehicle"]
1384    MAV_CMD_NAV_FOLLOW = 25,
1385    #[doc = "Continue on the current course and climb/descend to specified altitude.  When the altitude is reached continue to the next command (i.e., don't proceed to the next command until the desired altitude is reached."]
1386    MAV_CMD_NAV_CONTINUE_AND_CHANGE_ALT = 30,
1387    #[doc = "Begin loiter at the specified Latitude and Longitude.  If Lat=Lon=0, then loiter at the current position.  Don't consider the navigation command complete (don't leave loiter) until the altitude has been reached. Additionally, if the Heading Required parameter is non-zero the aircraft will not leave the loiter until heading toward the next waypoint."]
1388    MAV_CMD_NAV_LOITER_TO_ALT = 31,
1389    #[doc = "Begin following a target"]
1390    MAV_CMD_DO_FOLLOW = 32,
1391    #[doc = "Reposition the MAV after a follow target command has been sent"]
1392    MAV_CMD_DO_FOLLOW_REPOSITION = 33,
1393    #[doc = "Start orbiting on the circumference of a circle defined by the parameters. Setting values to NaN/INT32_MAX (as appropriate) results in using defaults."]
1394    MAV_CMD_DO_ORBIT = 34,
1395    #[deprecated = " See `MAV_CMD_DO_SET_ROI_*` (Deprecated since 2018-01)"]
1396    #[doc = "Sets the region of interest (ROI) for a sensor set or the vehicle itself. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras."]
1397    MAV_CMD_NAV_ROI = 80,
1398    #[doc = "Control autonomous path planning on the MAV."]
1399    MAV_CMD_NAV_PATHPLANNING = 81,
1400    #[doc = "Navigate to waypoint using a spline path."]
1401    MAV_CMD_NAV_SPLINE_WAYPOINT = 82,
1402    #[doc = "Takeoff from ground using VTOL mode, and transition to forward flight with specified heading. The command should be ignored by vehicles that dont support both VTOL and fixed-wing flight (multicopters, boats,etc.)."]
1403    MAV_CMD_NAV_VTOL_TAKEOFF = 84,
1404    #[doc = "Land using VTOL mode"]
1405    MAV_CMD_NAV_VTOL_LAND = 85,
1406    #[doc = "hand control over to an external controller"]
1407    MAV_CMD_NAV_GUIDED_ENABLE = 92,
1408    #[doc = "Delay the next navigation command a number of seconds or until a specified time"]
1409    MAV_CMD_NAV_DELAY = 93,
1410    #[doc = "Descend and place payload. Vehicle moves to specified location, descends until it detects a hanging payload has reached the ground, and then releases the payload. If ground is not detected before the reaching the maximum descent value (param1), the command will complete without releasing the payload."]
1411    MAV_CMD_NAV_PAYLOAD_PLACE = 94,
1412    #[doc = "NOP - This command is only used to mark the upper limit of the NAV/ACTION commands in the enumeration"]
1413    MAV_CMD_NAV_LAST = 95,
1414    #[doc = "Delay mission state machine."]
1415    MAV_CMD_CONDITION_DELAY = 112,
1416    #[doc = "Ascend/descend to target altitude at specified rate. Delay mission state machine until desired altitude reached."]
1417    MAV_CMD_CONDITION_CHANGE_ALT = 113,
1418    #[doc = "Delay mission state machine until within desired distance of next NAV point."]
1419    MAV_CMD_CONDITION_DISTANCE = 114,
1420    #[doc = "Reach a certain target angle."]
1421    MAV_CMD_CONDITION_YAW = 115,
1422    #[doc = "NOP - This command is only used to mark the upper limit of the CONDITION commands in the enumeration"]
1423    MAV_CMD_CONDITION_LAST = 159,
1424    #[doc = "Set system mode."]
1425    MAV_CMD_DO_SET_MODE = 176,
1426    #[doc = "Jump to the desired command in the mission list.  Repeat this action only the specified number of times"]
1427    MAV_CMD_DO_JUMP = 177,
1428    #[doc = "Change speed and/or throttle set points. The value persists until it is overridden or there is a mode change"]
1429    MAV_CMD_DO_CHANGE_SPEED = 178,
1430    #[doc = "Sets the home position to either to the current position or a specified position.           The home position is the default position that the system will return to and land on.           The position is set automatically by the system during the takeoff (and may also be set using this command).           Note: the current home position may be emitted in a HOME_POSITION message on request (using MAV_CMD_REQUEST_MESSAGE with param1=242)."]
1431    MAV_CMD_DO_SET_HOME = 179,
1432    #[deprecated = " See `PARAM_SET` (Deprecated since 2024-04)"]
1433    #[doc = "Set a system parameter.  Caution!  Use of this command requires knowledge of the numeric enumeration value of the parameter."]
1434    MAV_CMD_DO_SET_PARAMETER = 180,
1435    #[doc = "Set a relay to a condition."]
1436    MAV_CMD_DO_SET_RELAY = 181,
1437    #[doc = "Cycle a relay on and off for a desired number of cycles with a desired period."]
1438    MAV_CMD_DO_REPEAT_RELAY = 182,
1439    #[doc = "Set a servo to a desired PWM value."]
1440    MAV_CMD_DO_SET_SERVO = 183,
1441    #[doc = "Cycle a between its nominal setting and a desired PWM for a desired number of cycles with a desired period."]
1442    MAV_CMD_DO_REPEAT_SERVO = 184,
1443    #[doc = "0.5); the ACK should be either MAV_RESULT_FAILED or MAV_RESULT_UNSUPPORTED."]
1444    MAV_CMD_DO_FLIGHTTERMINATION = 185,
1445    #[doc = "Change altitude set point."]
1446    MAV_CMD_DO_CHANGE_ALTITUDE = 186,
1447    #[doc = "Sets actuators (e.g. servos) to a desired value. The actuator numbers are mapped to specific outputs (e.g. on any MAIN or AUX PWM or UAVCAN) using a flight-stack specific mechanism (i.e. a parameter)."]
1448    MAV_CMD_DO_SET_ACTUATOR = 187,
1449    #[doc = "Mission item to specify the start of a failsafe/landing return-path segment (the end of the segment is the next MAV_CMD_DO_LAND_START item).           A vehicle that is using missions for landing (e.g. in a return mode) will join the mission on the closest path of the return-path segment (instead of MAV_CMD_DO_LAND_START or the nearest waypoint).           The main use case is to minimize the failsafe flight path in corridor missions, where the inbound/outbound paths are constrained (by geofences) to the same particular path.           The MAV_CMD_NAV_RETURN_PATH_START would be placed at the start of the return path.           If a failsafe occurs on the outbound path the vehicle will move to the nearest point on the return path (which is parallel for this kind of mission), effectively turning round and following the shortest path to landing.           If a failsafe occurs on the inbound path the vehicle is already on the return segment and will continue to landing.           The Latitude/Longitude/Altitude are optional, and may be set to 0 if not needed.           If specified, the item defines the waypoint at which the return segment starts.           If sent using as a command, the vehicle will perform a mission landing (using the land segment if defined) or reject the command if mission landings are not supported, or no mission landing is defined. When used as a command any position information in the command is ignored."]
1450    MAV_CMD_DO_RETURN_PATH_START = 188,
1451    #[doc = "Mission item to mark the start of a mission landing pattern, or a command to land with a mission landing pattern.          When used in a mission, this is a marker for the start of a sequence of mission items that represent a landing pattern.         It should be followed by a navigation item that defines the first waypoint of the landing sequence.         The start marker positional params are used only for selecting what landing pattern to use if several are defined in the mission (the selected pattern will be the one with the marker position that is closest to the vehicle when a landing is commanded).         If the marker item position has zero-values for latitude, longitude, and altitude, then landing pattern selection is instead based on the position of the first waypoint in the landing sequence.  \t      When sent as a command it triggers a landing using a mission landing pattern. \t      The location parameters are not used in this case, and should be set to 0."]
1452    MAV_CMD_DO_LAND_START = 189,
1453    #[doc = "Mission command to perform a landing from a rally point."]
1454    MAV_CMD_DO_RALLY_LAND = 190,
1455    #[doc = "Mission command to safely abort an autonomous landing."]
1456    MAV_CMD_DO_GO_AROUND = 191,
1457    #[doc = "Reposition the vehicle to a specific WGS84 global position. This command is intended for guided commands (for missions use MAV_CMD_NAV_WAYPOINT instead)."]
1458    MAV_CMD_DO_REPOSITION = 192,
1459    #[doc = "If in a GPS controlled position mode, hold the current position or continue."]
1460    MAV_CMD_DO_PAUSE_CONTINUE = 193,
1461    #[doc = "Set moving direction to forward or reverse."]
1462    MAV_CMD_DO_SET_REVERSE = 194,
1463    #[doc = "Sets the region of interest (ROI) to a location. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal is not to react to this message."]
1464    MAV_CMD_DO_SET_ROI_LOCATION = 195,
1465    #[doc = "Sets the region of interest (ROI) to be toward next waypoint, with optional pitch/roll/yaw offset. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal device is not to react to this message."]
1466    MAV_CMD_DO_SET_ROI_WPNEXT_OFFSET = 196,
1467    #[doc = "Cancels any previous ROI command returning the vehicle/sensors to default flight characteristics. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal device is not to react to this message. After this command the gimbal manager should go back to manual input if available, and otherwise assume a neutral position."]
1468    MAV_CMD_DO_SET_ROI_NONE = 197,
1469    #[doc = "Mount tracks system with specified system ID. Determination of target vehicle position may be done with GLOBAL_POSITION_INT or any other means. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal device is not to react to this message."]
1470    MAV_CMD_DO_SET_ROI_SYSID = 198,
1471    #[doc = "Control onboard camera system."]
1472    MAV_CMD_DO_CONTROL_VIDEO = 200,
1473    #[deprecated = " See `MAV_CMD_DO_SET_ROI_*` (Deprecated since 2018-01)"]
1474    #[doc = "Sets the region of interest (ROI) for a sensor set or the vehicle itself. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras."]
1475    MAV_CMD_DO_SET_ROI = 201,
1476    #[doc = "Configure digital camera. This is a fallback message for systems that have not yet implemented PARAM_EXT_XXX messages and camera definition files (see <https://mavlink.io/en/services/camera_def.html> )."]
1477    MAV_CMD_DO_DIGICAM_CONFIGURE = 202,
1478    #[doc = "Control digital camera. This is a fallback message for systems that have not yet implemented PARAM_EXT_XXX messages and camera definition files (see <https://mavlink.io/en/services/camera_def.html> )."]
1479    MAV_CMD_DO_DIGICAM_CONTROL = 203,
1480    #[deprecated = "This message has been superseded by MAV_CMD_DO_GIMBAL_MANAGER_CONFIGURE. The message can still be used to communicate with legacy gimbals implementing it. See `MAV_CMD_DO_GIMBAL_MANAGER_CONFIGURE` (Deprecated since 2020-01)"]
1481    #[doc = "Mission command to configure a camera or antenna mount"]
1482    MAV_CMD_DO_MOUNT_CONFIGURE = 204,
1483    #[deprecated = "This message is ambiguous and inconsistent. It has been superseded by MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW and `MAV_CMD_DO_SET_ROI_*` variants. The message can still be used to communicate with legacy gimbals implementing it. See `MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW` (Deprecated since 2020-01)"]
1484    #[doc = "Mission command to control a camera or antenna mount"]
1485    MAV_CMD_DO_MOUNT_CONTROL = 205,
1486    #[doc = "Mission command to set camera trigger distance for this flight. The camera is triggered each time this distance is exceeded. This command can also be used to set the shutter integration time for the camera."]
1487    MAV_CMD_DO_SET_CAM_TRIGG_DIST = 206,
1488    #[doc = "Enable the geofence.           This can be used in a mission or via the command protocol.           The persistence/lifetime of the setting is undefined.           Depending on flight stack implementation it may persist until superseded, or it may revert to a system default at the end of a mission.           Flight stacks typically reset the setting to system defaults on reboot."]
1489    MAV_CMD_DO_FENCE_ENABLE = 207,
1490    #[doc = "Mission item/command to release a parachute or enable/disable auto release."]
1491    MAV_CMD_DO_PARACHUTE = 208,
1492    #[doc = "Command to perform motor test."]
1493    MAV_CMD_DO_MOTOR_TEST = 209,
1494    #[doc = "Change to/from inverted flight."]
1495    MAV_CMD_DO_INVERTED_FLIGHT = 210,
1496    #[doc = "Mission command to operate a gripper."]
1497    MAV_CMD_DO_GRIPPER = 211,
1498    #[doc = "Enable/disable autotune."]
1499    MAV_CMD_DO_AUTOTUNE_ENABLE = 212,
1500    #[doc = "Sets a desired vehicle turn angle and speed change."]
1501    MAV_CMD_NAV_SET_YAW_SPEED = 213,
1502    #[doc = "Mission command to set camera trigger interval for this flight. If triggering is enabled, the camera is triggered each time this interval expires. This command can also be used to set the shutter integration time for the camera."]
1503    MAV_CMD_DO_SET_CAM_TRIGG_INTERVAL = 214,
1504    #[deprecated = " See `MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW` (Deprecated since 2020-01)"]
1505    #[doc = "Mission command to control a camera or antenna mount, using a quaternion as reference."]
1506    MAV_CMD_DO_MOUNT_CONTROL_QUAT = 220,
1507    #[doc = "set id of master controller"]
1508    MAV_CMD_DO_GUIDED_MASTER = 221,
1509    #[doc = "Set limits for external control"]
1510    MAV_CMD_DO_GUIDED_LIMITS = 222,
1511    #[doc = "Control vehicle engine. This is interpreted by the vehicles engine controller to change the target engine state. It is intended for vehicles with internal combustion engines"]
1512    MAV_CMD_DO_ENGINE_CONTROL = 223,
1513    #[doc = "Set the mission item with sequence number seq as the current item and emit MISSION_CURRENT (whether or not the mission number changed).           If a mission is currently being executed, the system will continue to this new mission item on the shortest path, skipping any intermediate mission items. \t  Note that mission jump repeat counters are not reset unless param2 is set (see MAV_CMD_DO_JUMP param2).            This command may trigger a mission state-machine change on some systems: for example from MISSION_STATE_NOT_STARTED or MISSION_STATE_PAUSED to MISSION_STATE_ACTIVE.           If the system is in mission mode, on those systems this command might therefore start, restart or resume the mission.           If the system is not in mission mode this command must not trigger a switch to mission mode.            The mission may be \"reset\" using param2.           Resetting sets jump counters to initial values (to reset counters without changing the current mission item set the param1 to `-1`).           Resetting also explicitly changes a mission state of MISSION_STATE_COMPLETE to MISSION_STATE_PAUSED or MISSION_STATE_ACTIVE, potentially allowing it to resume when it is (next) in a mission mode.  \t  The command will ACK with MAV_RESULT_FAILED if the sequence number is out of range (including if there is no mission item)."]
1514    MAV_CMD_DO_SET_MISSION_CURRENT = 224,
1515    #[doc = "NOP - This command is only used to mark the upper limit of the DO commands in the enumeration"]
1516    MAV_CMD_DO_LAST = 240,
1517    #[doc = "Trigger calibration. This command will be only accepted if in pre-flight mode. Except for Temperature Calibration, only one sensor should be set in a single message and all others should be zero."]
1518    MAV_CMD_PREFLIGHT_CALIBRATION = 241,
1519    #[doc = "Set sensor offsets. This command will be only accepted if in pre-flight mode."]
1520    MAV_CMD_PREFLIGHT_SET_SENSOR_OFFSETS = 242,
1521    #[doc = "Trigger UAVCAN configuration (actuator ID assignment and direction mapping). Note that this maps to the legacy UAVCAN v0 function UAVCAN_ENUMERATE, which is intended to be executed just once during initial vehicle configuration (it is not a normal pre-flight command and has been poorly named)."]
1522    MAV_CMD_PREFLIGHT_UAVCAN = 243,
1523    #[doc = "Request storage of different parameter values and logs. This command will be only accepted if in pre-flight mode."]
1524    MAV_CMD_PREFLIGHT_STORAGE = 245,
1525    #[doc = "Request the reboot or shutdown of system components."]
1526    MAV_CMD_PREFLIGHT_REBOOT_SHUTDOWN = 246,
1527    #[doc = "Override current mission with command to pause mission, pause mission and move to position, continue/resume mission. When param 1 indicates that the mission is paused (MAV_GOTO_DO_HOLD), param 2 defines whether it holds in place or moves to another position."]
1528    MAV_CMD_OVERRIDE_GOTO = 252,
1529    #[doc = "Mission command to set a Camera Auto Mount Pivoting Oblique Survey (Replaces CAM_TRIGG_DIST for this purpose). The camera is triggered each time this distance is exceeded, then the mount moves to the next position. Params 4~6 set-up the angle limits and number of positions for oblique survey, where mount-enabled vehicles automatically roll the camera between shots to emulate an oblique camera setup (providing an increased HFOV). This command can also be used to set the shutter integration time for the camera."]
1530    MAV_CMD_OBLIQUE_SURVEY = 260,
1531    #[doc = "Enable the specified standard MAVLink mode.           If the specified mode is not supported, the vehicle should ACK with MAV_RESULT_FAILED.           See <https://mavlink.io/en/services/standard_modes.html>"]
1532    MAV_CMD_DO_SET_STANDARD_MODE = 262,
1533    #[doc = "start running a mission"]
1534    MAV_CMD_MISSION_START = 300,
1535    #[doc = "Actuator testing command. This is similar to MAV_CMD_DO_MOTOR_TEST but operates on the level of output functions, i.e. it is possible to test Motor1 independent from which output it is configured on. Autopilots must NACK this command with MAV_RESULT_TEMPORARILY_REJECTED while armed."]
1536    MAV_CMD_ACTUATOR_TEST = 310,
1537    #[doc = "Actuator configuration command."]
1538    MAV_CMD_CONFIGURE_ACTUATOR = 311,
1539    #[doc = "Arms / Disarms a component"]
1540    MAV_CMD_COMPONENT_ARM_DISARM = 400,
1541    #[doc = "Instructs a target system to run pre-arm checks.           This allows preflight checks to be run on demand, which may be useful on systems that normally run them at low rate, or which do not trigger checks when the armable state might have changed.           This command should return MAV_RESULT_ACCEPTED if it will run the checks.           The results of the checks are usually then reported in SYS_STATUS messages (this is system-specific).           The command should return MAV_RESULT_TEMPORARILY_REJECTED if the system is already armed."]
1542    MAV_CMD_RUN_PREARM_CHECKS = 401,
1543    #[doc = "Turns illuminators ON/OFF. An illuminator is a light source that is used for lighting up dark areas external to the system: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light)."]
1544    MAV_CMD_ILLUMINATOR_ON_OFF = 405,
1545    #[doc = "Configures illuminator settings. An illuminator is a light source that is used for lighting up dark areas external to the system: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light)."]
1546    MAV_CMD_DO_ILLUMINATOR_CONFIGURE = 406,
1547    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2022-04)"]
1548    #[doc = "Request the home position from the vehicle. \t  The vehicle will ACK the command and then emit the HOME_POSITION message."]
1549    MAV_CMD_GET_HOME_POSITION = 410,
1550    #[doc = "Inject artificial failure for testing purposes. Note that autopilots should implement an additional protection before accepting this command such as a specific param setting."]
1551    MAV_CMD_INJECT_FAILURE = 420,
1552    #[doc = "Starts receiver pairing."]
1553    MAV_CMD_START_RX_PAIR = 500,
1554    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2022-04)"]
1555    #[doc = "Request the interval between messages for a particular MAVLink message ID.           The receiver should ACK the command and then emit its response in a MESSAGE_INTERVAL message."]
1556    MAV_CMD_GET_MESSAGE_INTERVAL = 510,
1557    #[doc = "Set the interval between messages for a particular MAVLink message ID. This interface replaces REQUEST_DATA_STREAM."]
1558    MAV_CMD_SET_MESSAGE_INTERVAL = 511,
1559    #[doc = "Request the target system(s) emit a single instance of a specified message (i.e. a \"one-shot\" version of MAV_CMD_SET_MESSAGE_INTERVAL)."]
1560    MAV_CMD_REQUEST_MESSAGE = 512,
1561    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1562    #[doc = "Request MAVLink protocol version compatibility. All receivers should ACK the command and then emit their capabilities in an PROTOCOL_VERSION message"]
1563    MAV_CMD_REQUEST_PROTOCOL_VERSION = 519,
1564    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1565    #[doc = "Request autopilot capabilities. The receiver should ACK the command and then emit its capabilities in an AUTOPILOT_VERSION message"]
1566    MAV_CMD_REQUEST_AUTOPILOT_CAPABILITIES = 520,
1567    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1568    #[doc = "Request camera information (CAMERA_INFORMATION)."]
1569    MAV_CMD_REQUEST_CAMERA_INFORMATION = 521,
1570    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1571    #[doc = "Request camera settings (CAMERA_SETTINGS)."]
1572    MAV_CMD_REQUEST_CAMERA_SETTINGS = 522,
1573    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1574    #[doc = "Request storage information (STORAGE_INFORMATION). Use the command's target_component to target a specific component's storage."]
1575    MAV_CMD_REQUEST_STORAGE_INFORMATION = 525,
1576    #[doc = "Format a storage medium. Once format is complete, a STORAGE_INFORMATION message is sent. Use the command's target_component to target a specific component's storage."]
1577    MAV_CMD_STORAGE_FORMAT = 526,
1578    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1579    #[doc = "Request camera capture status (CAMERA_CAPTURE_STATUS)"]
1580    MAV_CMD_REQUEST_CAMERA_CAPTURE_STATUS = 527,
1581    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1582    #[doc = "Request flight information (FLIGHT_INFORMATION)"]
1583    MAV_CMD_REQUEST_FLIGHT_INFORMATION = 528,
1584    #[doc = "Reset all camera settings to Factory Default"]
1585    MAV_CMD_RESET_CAMERA_SETTINGS = 529,
1586    #[doc = "Set camera running mode. Use NaN for reserved values. GCS will send a MAV_CMD_REQUEST_VIDEO_STREAM_STATUS command after a mode change if the camera supports video streaming."]
1587    MAV_CMD_SET_CAMERA_MODE = 530,
1588    #[doc = "Set camera zoom. Camera must respond with a CAMERA_SETTINGS message (on success)."]
1589    MAV_CMD_SET_CAMERA_ZOOM = 531,
1590    #[doc = "Set camera focus. Camera must respond with a CAMERA_SETTINGS message (on success)."]
1591    MAV_CMD_SET_CAMERA_FOCUS = 532,
1592    #[doc = "Set that a particular storage is the preferred location for saving photos, videos, and/or other media (e.g. to set that an SD card is used for storing videos).           There can only be one preferred save location for each particular media type: setting a media usage flag will clear/reset that same flag if set on any other storage.           If no flag is set the system should use its default storage.           A target system can choose to always use default storage, in which case it should ACK the command with MAV_RESULT_UNSUPPORTED.           A target system can choose to not allow a particular storage to be set as preferred storage, in which case it should ACK the command with MAV_RESULT_DENIED."]
1593    MAV_CMD_SET_STORAGE_USAGE = 533,
1594    #[doc = "Set camera source. Changes the camera's active sources on cameras with multiple image sensors."]
1595    MAV_CMD_SET_CAMERA_SOURCE = 534,
1596    #[doc = "Tagged jump target. Can be jumped to with MAV_CMD_DO_JUMP_TAG."]
1597    MAV_CMD_JUMP_TAG = 600,
1598    #[doc = "Jump to the matching tag in the mission list. Repeat this action for the specified number of times. A mission should contain a single matching tag for each jump. If this is not the case then a jump to a missing tag should complete the mission, and a jump where there are multiple matching tags should always select the one with the lowest mission sequence number."]
1599    MAV_CMD_DO_JUMP_TAG = 601,
1600    #[doc = "Set gimbal manager pitch/yaw setpoints (low rate command). It is possible to set combinations of the values below. E.g. an angle as well as a desired angular rate can be used to get to this angle at a certain angular rate, or an angular rate only will result in continuous turning. NaN is to be used to signal unset. Note: only the gimbal manager will react to this command - it will be ignored by a gimbal device. Use GIMBAL_MANAGER_SET_PITCHYAW if you need to stream pitch/yaw setpoints at higher rate."]
1601    MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW = 1000,
1602    #[doc = "Gimbal configuration to set which sysid/compid is in primary and secondary control."]
1603    MAV_CMD_DO_GIMBAL_MANAGER_CONFIGURE = 1001,
1604    #[doc = "Start image capture sequence. CAMERA_IMAGE_CAPTURED must be emitted after each capture.            Param1 (id) may be used to specify the target camera: 0: all cameras, 1 to 6: autopilot-connected cameras, 7-255: MAVLink camera component ID.           It is needed in order to target specific cameras connected to the autopilot, or specific sensors in a multi-sensor camera (neither of which have a distinct MAVLink component ID).           It is also needed to specify the target camera in missions.            When used in a mission, an autopilot should execute the MAV_CMD for a specified local camera (param1 = 1-6), or resend it as a command if it is intended for a MAVLink camera (param1 = 7 - 255), setting the command's target_component as the param1 value (and setting param1 in the command to zero).           If the param1 is 0 the autopilot should do both.            When sent in a command the target MAVLink address is set using target_component.           If addressed specifically to an autopilot: param1 should be used in the same way as it is for missions (though command should NACK with MAV_RESULT_DENIED if a specified local camera does not exist).           If addressed to a MAVLink camera, param 1 can be used to address all cameras (0), or to separately address 1 to 7 individual sensors. Other values should be NACKed with MAV_RESULT_DENIED.           If the command is broadcast (target_component is 0) then param 1 should be set to 0 (any other value should be NACKED with MAV_RESULT_DENIED). An autopilot would trigger any local cameras and forward the command to all channels."]
1605    MAV_CMD_IMAGE_START_CAPTURE = 2000,
1606    #[doc = "Stop image capture sequence.            Param1 (id) may be used to specify the target camera: 0: all cameras, 1 to 6: autopilot-connected cameras, 7-255: MAVLink camera component ID.           It is needed in order to target specific cameras connected to the autopilot, or specific sensors in a multi-sensor camera (neither of which have a distinct MAVLink component ID).           It is also needed to specify the target camera in missions.            When used in a mission, an autopilot should execute the MAV_CMD for a specified local camera (param1 = 1-6), or resend it as a command if it is intended for a MAVLink camera (param1 = 7 - 255), setting the command's target_component as the param1 value (and setting param1 in the command to zero).           If the param1 is 0 the autopilot should do both.            When sent in a command the target MAVLink address is set using target_component.           If addressed specifically to an autopilot: param1 should be used in the same way as it is for missions (though command should NACK with MAV_RESULT_DENIED if a specified local camera does not exist).           If addressed to a MAVLink camera, param1 can be used to address all cameras (0), or to separately address 1 to 7 individual sensors. Other values should be NACKed with MAV_RESULT_DENIED.           If the command is broadcast (target_component is 0) then param 1 should be set to 0 (any other value should be NACKED with MAV_RESULT_DENIED). An autopilot would trigger any local cameras and forward the command to all channels."]
1607    MAV_CMD_IMAGE_STOP_CAPTURE = 2001,
1608    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1609    #[doc = "Re-request a CAMERA_IMAGE_CAPTURED message."]
1610    MAV_CMD_REQUEST_CAMERA_IMAGE_CAPTURE = 2002,
1611    #[doc = "Enable or disable on-board camera triggering system."]
1612    MAV_CMD_DO_TRIGGER_CONTROL = 2003,
1613    #[doc = "If the camera supports point visual tracking (CAMERA_CAP_FLAGS_HAS_TRACKING_POINT is set), this command allows to initiate the tracking."]
1614    MAV_CMD_CAMERA_TRACK_POINT = 2004,
1615    #[doc = "If the camera supports rectangle visual tracking (CAMERA_CAP_FLAGS_HAS_TRACKING_RECTANGLE is set), this command allows to initiate the tracking."]
1616    MAV_CMD_CAMERA_TRACK_RECTANGLE = 2005,
1617    #[doc = "Stops ongoing tracking."]
1618    MAV_CMD_CAMERA_STOP_TRACKING = 2010,
1619    #[doc = "Starts video capture (recording)."]
1620    MAV_CMD_VIDEO_START_CAPTURE = 2500,
1621    #[doc = "Stop the current video capture (recording)."]
1622    MAV_CMD_VIDEO_STOP_CAPTURE = 2501,
1623    #[doc = "Start video streaming"]
1624    MAV_CMD_VIDEO_START_STREAMING = 2502,
1625    #[doc = "Stop the given video stream"]
1626    MAV_CMD_VIDEO_STOP_STREAMING = 2503,
1627    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1628    #[doc = "Request video stream information (VIDEO_STREAM_INFORMATION)"]
1629    MAV_CMD_REQUEST_VIDEO_STREAM_INFORMATION = 2504,
1630    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1631    #[doc = "Request video stream status (VIDEO_STREAM_STATUS)"]
1632    MAV_CMD_REQUEST_VIDEO_STREAM_STATUS = 2505,
1633    #[doc = "Request to start streaming logging data over MAVLink (see also LOGGING_DATA message)"]
1634    MAV_CMD_LOGGING_START = 2510,
1635    #[doc = "Request to stop streaming log data over MAVLink"]
1636    MAV_CMD_LOGGING_STOP = 2511,
1637    MAV_CMD_AIRFRAME_CONFIGURATION = 2520,
1638    #[doc = "Request to start/stop transmitting over the high latency telemetry"]
1639    MAV_CMD_CONTROL_HIGH_LATENCY = 2600,
1640    #[doc = "Create a panorama at the current position"]
1641    MAV_CMD_PANORAMA_CREATE = 2800,
1642    #[doc = "Request VTOL transition"]
1643    MAV_CMD_DO_VTOL_TRANSITION = 3000,
1644    #[doc = "Request authorization to arm the vehicle to a external entity, the arm authorizer is responsible to request all data that is needs from the vehicle before authorize or deny the request. \t\tIf approved the COMMAND_ACK message progress field should be set with period of time that this authorization is valid in seconds. \t\tIf the authorization is denied COMMAND_ACK.result_param2 should be set with one of the reasons in ARM_AUTH_DENIED_REASON."]
1645    MAV_CMD_ARM_AUTHORIZATION_REQUEST = 3001,
1646    #[doc = "This command sets the submode to standard guided when vehicle is in guided mode. The vehicle holds position and altitude and the user can input the desired velocities along all three axes."]
1647    MAV_CMD_SET_GUIDED_SUBMODE_STANDARD = 4000,
1648    #[doc = "This command sets submode circle when vehicle is in guided mode. Vehicle flies along a circle facing the center of the circle. The user can input the velocity along the circle and change the radius. If no input is given the vehicle will hold position."]
1649    MAV_CMD_SET_GUIDED_SUBMODE_CIRCLE = 4001,
1650    #[doc = "Delay mission state machine until gate has been reached."]
1651    MAV_CMD_CONDITION_GATE = 4501,
1652    #[doc = "Fence return point (there can only be one such point in a geofence definition). If rally points are supported they should be used instead."]
1653    MAV_CMD_NAV_FENCE_RETURN_POINT = 5000,
1654    #[doc = "Fence vertex for an inclusion polygon (the polygon must not be self-intersecting). The vehicle must stay within this area. Minimum of 3 vertices required.           The vertices for a polygon must be sent sequentially, each with param1 set to the total number of vertices in the polygon."]
1655    MAV_CMD_NAV_FENCE_POLYGON_VERTEX_INCLUSION = 5001,
1656    #[doc = "Fence vertex for an exclusion polygon (the polygon must not be self-intersecting). The vehicle must stay outside this area. Minimum of 3 vertices required.           The vertices for a polygon must be sent sequentially, each with param1 set to the total number of vertices in the polygon."]
1657    MAV_CMD_NAV_FENCE_POLYGON_VERTEX_EXCLUSION = 5002,
1658    #[doc = "Circular fence area. The vehicle must stay inside this area."]
1659    MAV_CMD_NAV_FENCE_CIRCLE_INCLUSION = 5003,
1660    #[doc = "Circular fence area. The vehicle must stay outside this area."]
1661    MAV_CMD_NAV_FENCE_CIRCLE_EXCLUSION = 5004,
1662    #[doc = "Rally point. You can have multiple rally points defined."]
1663    MAV_CMD_NAV_RALLY_POINT = 5100,
1664    #[doc = "Commands the vehicle to respond with a sequence of messages UAVCAN_NODE_INFO, one message per every UAVCAN node that is online. Note that some of the response messages can be lost, which the receiver can detect easily by checking whether every received UAVCAN_NODE_STATUS has a matching message UAVCAN_NODE_INFO received earlier; if not, this command should be sent again in order to request re-transmission of the node information messages."]
1665    MAV_CMD_UAVCAN_GET_NODE_INFO = 5200,
1666    #[doc = "Change state of safety switch."]
1667    MAV_CMD_DO_SET_SAFETY_SWITCH_STATE = 5300,
1668    #[doc = "Trigger the start of an ADSB-out IDENT. This should only be used when requested to do so by an Air Traffic Controller in controlled airspace. This starts the IDENT which is then typically held for 18 seconds by the hardware per the Mode A, C, and S transponder spec."]
1669    MAV_CMD_DO_ADSB_OUT_IDENT = 10001,
1670    #[deprecated = "  (Deprecated since 2021-06)"]
1671    #[doc = "Deploy payload on a Lat / Lon / Alt position. This includes the navigation to reach the required release position and velocity."]
1672    MAV_CMD_PAYLOAD_PREPARE_DEPLOY = 30001,
1673    #[deprecated = "  (Deprecated since 2021-06)"]
1674    #[doc = "Control the payload deployment."]
1675    MAV_CMD_PAYLOAD_CONTROL_DEPLOY = 30002,
1676    #[doc = "Magnetometer calibration based on provided known yaw. This allows for fast calibration using WMM field tables in the vehicle, given only the known yaw of the vehicle. If Latitude and longitude are both zero then use the current vehicle location."]
1677    MAV_CMD_FIXED_MAG_CAL_YAW = 42006,
1678    #[doc = "Command to operate winch."]
1679    MAV_CMD_DO_WINCH = 42600,
1680    #[doc = "Provide an external position estimate for use when dead-reckoning. This is meant to be used for occasional position resets that may be provided by a external system such as a remote pilot using landmarks over a video link."]
1681    MAV_CMD_EXTERNAL_POSITION_ESTIMATE = 43003,
1682    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
1683    MAV_CMD_WAYPOINT_USER_1 = 31000,
1684    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
1685    MAV_CMD_WAYPOINT_USER_2 = 31001,
1686    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
1687    MAV_CMD_WAYPOINT_USER_3 = 31002,
1688    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
1689    MAV_CMD_WAYPOINT_USER_4 = 31003,
1690    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
1691    MAV_CMD_WAYPOINT_USER_5 = 31004,
1692    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
1693    MAV_CMD_SPATIAL_USER_1 = 31005,
1694    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
1695    MAV_CMD_SPATIAL_USER_2 = 31006,
1696    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
1697    MAV_CMD_SPATIAL_USER_3 = 31007,
1698    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
1699    MAV_CMD_SPATIAL_USER_4 = 31008,
1700    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
1701    MAV_CMD_SPATIAL_USER_5 = 31009,
1702    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
1703    MAV_CMD_USER_1 = 31010,
1704    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
1705    MAV_CMD_USER_2 = 31011,
1706    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
1707    MAV_CMD_USER_3 = 31012,
1708    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
1709    MAV_CMD_USER_4 = 31013,
1710    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
1711    MAV_CMD_USER_5 = 31014,
1712    #[doc = "Request forwarding of CAN packets from the given CAN bus to this component. CAN Frames are sent using CAN_FRAME and CANFD_FRAME messages"]
1713    MAV_CMD_CAN_FORWARD = 32000,
1714    #[doc = "Mission command to reset Maximum Power Point Tracker (MPPT)"]
1715    MAV_CMD_RESET_MPPT = 40001,
1716    #[doc = "Mission command to perform a power cycle on payload"]
1717    MAV_CMD_PAYLOAD_CONTROL = 40002,
1718}
1719impl MavCmd {
1720    pub const DEFAULT: Self = Self::MAV_CMD_NAV_WAYPOINT;
1721}
1722impl Default for MavCmd {
1723    fn default() -> Self {
1724        Self::DEFAULT
1725    }
1726}
1727#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1728#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1729#[cfg_attr(feature = "serde", serde(tag = "type"))]
1730#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1731#[repr(u32)]
1732#[doc = "Possible actions an aircraft can take to avoid a collision."]
1733pub enum MavCollisionAction {
1734    #[doc = "Ignore any potential collisions"]
1735    MAV_COLLISION_ACTION_NONE = 0,
1736    #[doc = "Report potential collision"]
1737    MAV_COLLISION_ACTION_REPORT = 1,
1738    #[doc = "Ascend or Descend to avoid threat"]
1739    MAV_COLLISION_ACTION_ASCEND_OR_DESCEND = 2,
1740    #[doc = "Move horizontally to avoid threat"]
1741    MAV_COLLISION_ACTION_MOVE_HORIZONTALLY = 3,
1742    #[doc = "Aircraft to move perpendicular to the collision's velocity vector"]
1743    MAV_COLLISION_ACTION_MOVE_PERPENDICULAR = 4,
1744    #[doc = "Aircraft to fly directly back to its launch point"]
1745    MAV_COLLISION_ACTION_RTL = 5,
1746    #[doc = "Aircraft to stop in place"]
1747    MAV_COLLISION_ACTION_HOVER = 6,
1748}
1749impl MavCollisionAction {
1750    pub const DEFAULT: Self = Self::MAV_COLLISION_ACTION_NONE;
1751}
1752impl Default for MavCollisionAction {
1753    fn default() -> Self {
1754        Self::DEFAULT
1755    }
1756}
1757#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1758#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1759#[cfg_attr(feature = "serde", serde(tag = "type"))]
1760#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1761#[repr(u32)]
1762#[doc = "Source of information about this collision."]
1763pub enum MavCollisionSrc {
1764    #[doc = "ID field references ADSB_VEHICLE packets"]
1765    MAV_COLLISION_SRC_ADSB = 0,
1766    #[doc = "ID field references MAVLink SRC ID"]
1767    MAV_COLLISION_SRC_MAVLINK_GPS_GLOBAL_INT = 1,
1768}
1769impl MavCollisionSrc {
1770    pub const DEFAULT: Self = Self::MAV_COLLISION_SRC_ADSB;
1771}
1772impl Default for MavCollisionSrc {
1773    fn default() -> Self {
1774        Self::DEFAULT
1775    }
1776}
1777#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1778#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1779#[cfg_attr(feature = "serde", serde(tag = "type"))]
1780#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1781#[repr(u32)]
1782#[doc = "Aircraft-rated danger from this threat."]
1783pub enum MavCollisionThreatLevel {
1784    #[doc = "Not a threat"]
1785    MAV_COLLISION_THREAT_LEVEL_NONE = 0,
1786    #[doc = "Craft is mildly concerned about this threat"]
1787    MAV_COLLISION_THREAT_LEVEL_LOW = 1,
1788    #[doc = "Craft is panicking, and may take actions to avoid threat"]
1789    MAV_COLLISION_THREAT_LEVEL_HIGH = 2,
1790}
1791impl MavCollisionThreatLevel {
1792    pub const DEFAULT: Self = Self::MAV_COLLISION_THREAT_LEVEL_NONE;
1793}
1794impl Default for MavCollisionThreatLevel {
1795    fn default() -> Self {
1796        Self::DEFAULT
1797    }
1798}
1799#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1800#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1801#[cfg_attr(feature = "serde", serde(tag = "type"))]
1802#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1803#[repr(u32)]
1804#[doc = "Component ids (values) for the different types and instances of onboard hardware/software that might make up a MAVLink system (autopilot, cameras, servos, GPS systems, avoidance systems etc.).       Components must use the appropriate ID in their source address when sending messages. Components can also use IDs to determine if they are the intended recipient of an incoming message. The MAV_COMP_ID_ALL value is used to indicate messages that must be processed by all components.       When creating new entries, components that can have multiple instances (e.g. cameras, servos etc.) should be allocated sequential values. An appropriate number of values should be left free after these components to allow the number of instances to be expanded."]
1805pub enum MavComponent {
1806    #[doc = "Target id (target_component) used to broadcast messages to all components of the receiving system. Components should attempt to process messages with this component ID and forward to components on any other interfaces. Note: This is not a valid *source* component id for a message."]
1807    MAV_COMP_ID_ALL = 0,
1808    #[doc = "System flight controller component (\"autopilot\"). Only one autopilot is expected in a particular system."]
1809    MAV_COMP_ID_AUTOPILOT1 = 1,
1810    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1811    MAV_COMP_ID_USER1 = 25,
1812    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1813    MAV_COMP_ID_USER2 = 26,
1814    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1815    MAV_COMP_ID_USER3 = 27,
1816    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1817    MAV_COMP_ID_USER4 = 28,
1818    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1819    MAV_COMP_ID_USER5 = 29,
1820    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1821    MAV_COMP_ID_USER6 = 30,
1822    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1823    MAV_COMP_ID_USER7 = 31,
1824    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1825    MAV_COMP_ID_USER8 = 32,
1826    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1827    MAV_COMP_ID_USER9 = 33,
1828    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1829    MAV_COMP_ID_USER10 = 34,
1830    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1831    MAV_COMP_ID_USER11 = 35,
1832    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1833    MAV_COMP_ID_USER12 = 36,
1834    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1835    MAV_COMP_ID_USER13 = 37,
1836    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1837    MAV_COMP_ID_USER14 = 38,
1838    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1839    MAV_COMP_ID_USER15 = 39,
1840    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1841    MAV_COMP_ID_USER16 = 40,
1842    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1843    MAV_COMP_ID_USER17 = 41,
1844    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1845    MAV_COMP_ID_USER18 = 42,
1846    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1847    MAV_COMP_ID_USER19 = 43,
1848    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1849    MAV_COMP_ID_USER20 = 44,
1850    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1851    MAV_COMP_ID_USER21 = 45,
1852    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1853    MAV_COMP_ID_USER22 = 46,
1854    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1855    MAV_COMP_ID_USER23 = 47,
1856    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1857    MAV_COMP_ID_USER24 = 48,
1858    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1859    MAV_COMP_ID_USER25 = 49,
1860    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1861    MAV_COMP_ID_USER26 = 50,
1862    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1863    MAV_COMP_ID_USER27 = 51,
1864    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1865    MAV_COMP_ID_USER28 = 52,
1866    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1867    MAV_COMP_ID_USER29 = 53,
1868    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1869    MAV_COMP_ID_USER30 = 54,
1870    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1871    MAV_COMP_ID_USER31 = 55,
1872    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1873    MAV_COMP_ID_USER32 = 56,
1874    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1875    MAV_COMP_ID_USER33 = 57,
1876    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1877    MAV_COMP_ID_USER34 = 58,
1878    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1879    MAV_COMP_ID_USER35 = 59,
1880    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1881    MAV_COMP_ID_USER36 = 60,
1882    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1883    MAV_COMP_ID_USER37 = 61,
1884    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1885    MAV_COMP_ID_USER38 = 62,
1886    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1887    MAV_COMP_ID_USER39 = 63,
1888    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1889    MAV_COMP_ID_USER40 = 64,
1890    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1891    MAV_COMP_ID_USER41 = 65,
1892    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1893    MAV_COMP_ID_USER42 = 66,
1894    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1895    MAV_COMP_ID_USER43 = 67,
1896    #[doc = "Telemetry radio (e.g. SiK radio, or other component that emits RADIO_STATUS messages)."]
1897    MAV_COMP_ID_TELEMETRY_RADIO = 68,
1898    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1899    MAV_COMP_ID_USER45 = 69,
1900    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1901    MAV_COMP_ID_USER46 = 70,
1902    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1903    MAV_COMP_ID_USER47 = 71,
1904    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1905    MAV_COMP_ID_USER48 = 72,
1906    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1907    MAV_COMP_ID_USER49 = 73,
1908    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1909    MAV_COMP_ID_USER50 = 74,
1910    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1911    MAV_COMP_ID_USER51 = 75,
1912    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1913    MAV_COMP_ID_USER52 = 76,
1914    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1915    MAV_COMP_ID_USER53 = 77,
1916    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1917    MAV_COMP_ID_USER54 = 78,
1918    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1919    MAV_COMP_ID_USER55 = 79,
1920    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1921    MAV_COMP_ID_USER56 = 80,
1922    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1923    MAV_COMP_ID_USER57 = 81,
1924    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1925    MAV_COMP_ID_USER58 = 82,
1926    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1927    MAV_COMP_ID_USER59 = 83,
1928    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1929    MAV_COMP_ID_USER60 = 84,
1930    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1931    MAV_COMP_ID_USER61 = 85,
1932    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1933    MAV_COMP_ID_USER62 = 86,
1934    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1935    MAV_COMP_ID_USER63 = 87,
1936    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1937    MAV_COMP_ID_USER64 = 88,
1938    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1939    MAV_COMP_ID_USER65 = 89,
1940    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1941    MAV_COMP_ID_USER66 = 90,
1942    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1943    MAV_COMP_ID_USER67 = 91,
1944    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1945    MAV_COMP_ID_USER68 = 92,
1946    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1947    MAV_COMP_ID_USER69 = 93,
1948    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1949    MAV_COMP_ID_USER70 = 94,
1950    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1951    MAV_COMP_ID_USER71 = 95,
1952    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1953    MAV_COMP_ID_USER72 = 96,
1954    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1955    MAV_COMP_ID_USER73 = 97,
1956    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1957    MAV_COMP_ID_USER74 = 98,
1958    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1959    MAV_COMP_ID_USER75 = 99,
1960    #[doc = "Camera #1."]
1961    MAV_COMP_ID_CAMERA = 100,
1962    #[doc = "Camera #2."]
1963    MAV_COMP_ID_CAMERA2 = 101,
1964    #[doc = "Camera #3."]
1965    MAV_COMP_ID_CAMERA3 = 102,
1966    #[doc = "Camera #4."]
1967    MAV_COMP_ID_CAMERA4 = 103,
1968    #[doc = "Camera #5."]
1969    MAV_COMP_ID_CAMERA5 = 104,
1970    #[doc = "Camera #6."]
1971    MAV_COMP_ID_CAMERA6 = 105,
1972    #[doc = "Servo #1."]
1973    MAV_COMP_ID_SERVO1 = 140,
1974    #[doc = "Servo #2."]
1975    MAV_COMP_ID_SERVO2 = 141,
1976    #[doc = "Servo #3."]
1977    MAV_COMP_ID_SERVO3 = 142,
1978    #[doc = "Servo #4."]
1979    MAV_COMP_ID_SERVO4 = 143,
1980    #[doc = "Servo #5."]
1981    MAV_COMP_ID_SERVO5 = 144,
1982    #[doc = "Servo #6."]
1983    MAV_COMP_ID_SERVO6 = 145,
1984    #[doc = "Servo #7."]
1985    MAV_COMP_ID_SERVO7 = 146,
1986    #[doc = "Servo #8."]
1987    MAV_COMP_ID_SERVO8 = 147,
1988    #[doc = "Servo #9."]
1989    MAV_COMP_ID_SERVO9 = 148,
1990    #[doc = "Servo #10."]
1991    MAV_COMP_ID_SERVO10 = 149,
1992    #[doc = "Servo #11."]
1993    MAV_COMP_ID_SERVO11 = 150,
1994    #[doc = "Servo #12."]
1995    MAV_COMP_ID_SERVO12 = 151,
1996    #[doc = "Servo #13."]
1997    MAV_COMP_ID_SERVO13 = 152,
1998    #[doc = "Servo #14."]
1999    MAV_COMP_ID_SERVO14 = 153,
2000    #[doc = "Gimbal #1."]
2001    MAV_COMP_ID_GIMBAL = 154,
2002    #[doc = "Logging component."]
2003    MAV_COMP_ID_LOG = 155,
2004    #[doc = "Automatic Dependent Surveillance-Broadcast (ADS-B) component."]
2005    MAV_COMP_ID_ADSB = 156,
2006    #[doc = "On Screen Display (OSD) devices for video links."]
2007    MAV_COMP_ID_OSD = 157,
2008    #[doc = "Generic autopilot peripheral component ID. Meant for devices that do not implement the parameter microservice."]
2009    MAV_COMP_ID_PERIPHERAL = 158,
2010    #[deprecated = "All gimbals should use MAV_COMP_ID_GIMBAL. See `MAV_COMP_ID_GIMBAL` (Deprecated since 2018-11)"]
2011    #[doc = "Gimbal ID for QX1."]
2012    MAV_COMP_ID_QX1_GIMBAL = 159,
2013    #[doc = "FLARM collision alert component."]
2014    MAV_COMP_ID_FLARM = 160,
2015    #[doc = "Parachute component."]
2016    MAV_COMP_ID_PARACHUTE = 161,
2017    #[doc = "Winch component."]
2018    MAV_COMP_ID_WINCH = 169,
2019    #[doc = "Gimbal #2."]
2020    MAV_COMP_ID_GIMBAL2 = 171,
2021    #[doc = "Gimbal #3."]
2022    MAV_COMP_ID_GIMBAL3 = 172,
2023    #[doc = "Gimbal #4"]
2024    MAV_COMP_ID_GIMBAL4 = 173,
2025    #[doc = "Gimbal #5."]
2026    MAV_COMP_ID_GIMBAL5 = 174,
2027    #[doc = "Gimbal #6."]
2028    MAV_COMP_ID_GIMBAL6 = 175,
2029    #[doc = "Battery #1."]
2030    MAV_COMP_ID_BATTERY = 180,
2031    #[doc = "Battery #2."]
2032    MAV_COMP_ID_BATTERY2 = 181,
2033    #[doc = "CAN over MAVLink client."]
2034    MAV_COMP_ID_MAVCAN = 189,
2035    #[doc = "Component that can generate/supply a mission flight plan (e.g. GCS or developer API)."]
2036    MAV_COMP_ID_MISSIONPLANNER = 190,
2037    #[doc = "Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on."]
2038    MAV_COMP_ID_ONBOARD_COMPUTER = 191,
2039    #[doc = "Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on."]
2040    MAV_COMP_ID_ONBOARD_COMPUTER2 = 192,
2041    #[doc = "Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on."]
2042    MAV_COMP_ID_ONBOARD_COMPUTER3 = 193,
2043    #[doc = "Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on."]
2044    MAV_COMP_ID_ONBOARD_COMPUTER4 = 194,
2045    #[doc = "Component that finds an optimal path between points based on a certain constraint (e.g. minimum snap, shortest path, cost, etc.)."]
2046    MAV_COMP_ID_PATHPLANNER = 195,
2047    #[doc = "Component that plans a collision free path between two points."]
2048    MAV_COMP_ID_OBSTACLE_AVOIDANCE = 196,
2049    #[doc = "Component that provides position estimates using VIO techniques."]
2050    MAV_COMP_ID_VISUAL_INERTIAL_ODOMETRY = 197,
2051    #[doc = "Component that manages pairing of vehicle and GCS."]
2052    MAV_COMP_ID_PAIRING_MANAGER = 198,
2053    #[doc = "Inertial Measurement Unit (IMU) #1."]
2054    MAV_COMP_ID_IMU = 200,
2055    #[doc = "Inertial Measurement Unit (IMU) #2."]
2056    MAV_COMP_ID_IMU_2 = 201,
2057    #[doc = "Inertial Measurement Unit (IMU) #3."]
2058    MAV_COMP_ID_IMU_3 = 202,
2059    #[doc = "GPS #1."]
2060    MAV_COMP_ID_GPS = 220,
2061    #[doc = "GPS #2."]
2062    MAV_COMP_ID_GPS2 = 221,
2063    #[doc = "Open Drone ID transmitter/receiver (Bluetooth/WiFi/Internet)."]
2064    MAV_COMP_ID_ODID_TXRX_1 = 236,
2065    #[doc = "Open Drone ID transmitter/receiver (Bluetooth/WiFi/Internet)."]
2066    MAV_COMP_ID_ODID_TXRX_2 = 237,
2067    #[doc = "Open Drone ID transmitter/receiver (Bluetooth/WiFi/Internet)."]
2068    MAV_COMP_ID_ODID_TXRX_3 = 238,
2069    #[doc = "Component to bridge MAVLink to UDP (i.e. from a UART)."]
2070    MAV_COMP_ID_UDP_BRIDGE = 240,
2071    #[doc = "Component to bridge to UART (i.e. from UDP)."]
2072    MAV_COMP_ID_UART_BRIDGE = 241,
2073    #[doc = "Component handling TUNNEL messages (e.g. vendor specific GUI of a component)."]
2074    MAV_COMP_ID_TUNNEL_NODE = 242,
2075    #[doc = "Illuminator"]
2076    MAV_COMP_ID_ILLUMINATOR = 243,
2077    #[deprecated = "System control does not require a separate component ID. Instead, system commands should be sent with target_component=MAV_COMP_ID_ALL allowing the target component to use any appropriate component id. See `MAV_COMP_ID_ALL` (Deprecated since 2018-11)"]
2078    #[doc = "Deprecated, don't use. Component for handling system messages (e.g. to ARM, takeoff, etc.)."]
2079    MAV_COMP_ID_SYSTEM_CONTROL = 250,
2080}
2081impl MavComponent {
2082    pub const DEFAULT: Self = Self::MAV_COMP_ID_ALL;
2083}
2084impl Default for MavComponent {
2085    fn default() -> Self {
2086        Self::DEFAULT
2087    }
2088}
2089#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2090#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2091#[cfg_attr(feature = "serde", serde(tag = "type"))]
2092#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2093#[repr(u32)]
2094#[deprecated = " See `MESSAGE_INTERVAL` (Deprecated since 2015-06)"]
2095#[doc = "A data stream is not a fixed set of messages, but rather a      recommendation to the autopilot software. Individual autopilots may or may not obey      the recommended messages."]
2096pub enum MavDataStream {
2097    #[doc = "Enable all data streams"]
2098    MAV_DATA_STREAM_ALL = 0,
2099    #[doc = "Enable IMU_RAW, GPS_RAW, GPS_STATUS packets."]
2100    MAV_DATA_STREAM_RAW_SENSORS = 1,
2101    #[doc = "Enable GPS_STATUS, CONTROL_STATUS, AUX_STATUS"]
2102    MAV_DATA_STREAM_EXTENDED_STATUS = 2,
2103    #[doc = "Enable RC_CHANNELS_SCALED, RC_CHANNELS_RAW, SERVO_OUTPUT_RAW"]
2104    MAV_DATA_STREAM_RC_CHANNELS = 3,
2105    #[doc = "Enable ATTITUDE_CONTROLLER_OUTPUT, POSITION_CONTROLLER_OUTPUT, NAV_CONTROLLER_OUTPUT."]
2106    MAV_DATA_STREAM_RAW_CONTROLLER = 4,
2107    #[doc = "Enable LOCAL_POSITION, GLOBAL_POSITION_INT messages."]
2108    MAV_DATA_STREAM_POSITION = 6,
2109    #[doc = "Dependent on the autopilot"]
2110    MAV_DATA_STREAM_EXTRA1 = 10,
2111    #[doc = "Dependent on the autopilot"]
2112    MAV_DATA_STREAM_EXTRA2 = 11,
2113    #[doc = "Dependent on the autopilot"]
2114    MAV_DATA_STREAM_EXTRA3 = 12,
2115}
2116impl MavDataStream {
2117    pub const DEFAULT: Self = Self::MAV_DATA_STREAM_ALL;
2118}
2119impl Default for MavDataStream {
2120    fn default() -> Self {
2121        Self::DEFAULT
2122    }
2123}
2124#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2125#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2126#[cfg_attr(feature = "serde", serde(tag = "type"))]
2127#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2128#[repr(u32)]
2129#[doc = "Enumeration of distance sensor types"]
2130pub enum MavDistanceSensor {
2131    #[doc = "Laser rangefinder, e.g. LightWare SF02/F or PulsedLight units"]
2132    MAV_DISTANCE_SENSOR_LASER = 0,
2133    #[doc = "Ultrasound rangefinder, e.g. MaxBotix units"]
2134    MAV_DISTANCE_SENSOR_ULTRASOUND = 1,
2135    #[doc = "Infrared rangefinder, e.g. Sharp units"]
2136    MAV_DISTANCE_SENSOR_INFRARED = 2,
2137    #[doc = "Radar type, e.g. uLanding units"]
2138    MAV_DISTANCE_SENSOR_RADAR = 3,
2139    #[doc = "Broken or unknown type, e.g. analog units"]
2140    MAV_DISTANCE_SENSOR_UNKNOWN = 4,
2141}
2142impl MavDistanceSensor {
2143    pub const DEFAULT: Self = Self::MAV_DISTANCE_SENSOR_LASER;
2144}
2145impl Default for MavDistanceSensor {
2146    fn default() -> Self {
2147        Self::DEFAULT
2148    }
2149}
2150#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2151#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2152#[cfg_attr(feature = "serde", serde(tag = "type"))]
2153#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2154#[repr(u32)]
2155#[doc = "Bitmap of options for the MAV_CMD_DO_REPOSITION"]
2156pub enum MavDoRepositionFlags {
2157    #[doc = "The aircraft should immediately transition into guided. This should not be set for follow me applications"]
2158    MAV_DO_REPOSITION_FLAGS_CHANGE_MODE = 1,
2159}
2160impl MavDoRepositionFlags {
2161    pub const DEFAULT: Self = Self::MAV_DO_REPOSITION_FLAGS_CHANGE_MODE;
2162}
2163impl Default for MavDoRepositionFlags {
2164    fn default() -> Self {
2165        Self::DEFAULT
2166    }
2167}
2168#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2169#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2170#[cfg_attr(feature = "serde", serde(tag = "type"))]
2171#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2172#[repr(u32)]
2173#[doc = "Enumeration of estimator types"]
2174pub enum MavEstimatorType {
2175    #[doc = "Unknown type of the estimator."]
2176    MAV_ESTIMATOR_TYPE_UNKNOWN = 0,
2177    #[doc = "This is a naive estimator without any real covariance feedback."]
2178    MAV_ESTIMATOR_TYPE_NAIVE = 1,
2179    #[doc = "Computer vision based estimate. Might be up to scale."]
2180    MAV_ESTIMATOR_TYPE_VISION = 2,
2181    #[doc = "Visual-inertial estimate."]
2182    MAV_ESTIMATOR_TYPE_VIO = 3,
2183    #[doc = "Plain GPS estimate."]
2184    MAV_ESTIMATOR_TYPE_GPS = 4,
2185    #[doc = "Estimator integrating GPS and inertial sensing."]
2186    MAV_ESTIMATOR_TYPE_GPS_INS = 5,
2187    #[doc = "Estimate from external motion capturing system."]
2188    MAV_ESTIMATOR_TYPE_MOCAP = 6,
2189    #[doc = "Estimator based on lidar sensor input."]
2190    MAV_ESTIMATOR_TYPE_LIDAR = 7,
2191    #[doc = "Estimator on autopilot."]
2192    MAV_ESTIMATOR_TYPE_AUTOPILOT = 8,
2193}
2194impl MavEstimatorType {
2195    pub const DEFAULT: Self = Self::MAV_ESTIMATOR_TYPE_UNKNOWN;
2196}
2197impl Default for MavEstimatorType {
2198    fn default() -> Self {
2199        Self::DEFAULT
2200    }
2201}
2202#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2203#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2204#[cfg_attr(feature = "serde", serde(tag = "type"))]
2205#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2206#[repr(u32)]
2207#[doc = "Flags for CURRENT_EVENT_SEQUENCE."]
2208pub enum MavEventCurrentSequenceFlags {
2209    #[doc = "A sequence reset has happened (e.g. vehicle reboot)."]
2210    MAV_EVENT_CURRENT_SEQUENCE_FLAGS_RESET = 1,
2211}
2212impl MavEventCurrentSequenceFlags {
2213    pub const DEFAULT: Self = Self::MAV_EVENT_CURRENT_SEQUENCE_FLAGS_RESET;
2214}
2215impl Default for MavEventCurrentSequenceFlags {
2216    fn default() -> Self {
2217        Self::DEFAULT
2218    }
2219}
2220#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2221#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2222#[cfg_attr(feature = "serde", serde(tag = "type"))]
2223#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2224#[repr(u32)]
2225#[doc = "Reason for an event error response."]
2226pub enum MavEventErrorReason {
2227    #[doc = "The requested event is not available (anymore)."]
2228    MAV_EVENT_ERROR_REASON_UNAVAILABLE = 0,
2229}
2230impl MavEventErrorReason {
2231    pub const DEFAULT: Self = Self::MAV_EVENT_ERROR_REASON_UNAVAILABLE;
2232}
2233impl Default for MavEventErrorReason {
2234    fn default() -> Self {
2235        Self::DEFAULT
2236    }
2237}
2238#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2239#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2240#[cfg_attr(feature = "serde", serde(tag = "type"))]
2241#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2242#[repr(u32)]
2243#[doc = "Coordinate frames used by MAVLink. Not all frames are supported by all commands, messages, or vehicles.        Global frames use the following naming conventions:       - \"GLOBAL\": Global coordinate frame with WGS84 latitude/longitude and altitude positive over mean sea level (MSL) by default.         The following modifiers may be used with \"GLOBAL\":         - \"RELATIVE_ALT\": Altitude is relative to the vehicle home position rather than MSL.         - \"TERRAIN_ALT\": Altitude is relative to ground level rather than MSL.         - \"INT\": Latitude/longitude (in degrees) are scaled by multiplying by 1E7.        Local frames use the following naming conventions:       - \"LOCAL\": Origin of local frame is fixed relative to earth. Unless otherwise specified this origin is the origin of the vehicle position-estimator (\"EKF\").       - \"BODY\": Origin of local frame travels with the vehicle. NOTE, \"BODY\" does NOT indicate alignment of frame axis with vehicle attitude.       - \"OFFSET\": Deprecated synonym for \"BODY\" (origin travels with the vehicle). Not to be used for new frames.        Some deprecated frames do not follow these conventions (e.g. MAV_FRAME_BODY_NED and MAV_FRAME_BODY_OFFSET_NED)."]
2244pub enum MavFrame {
2245    #[doc = "Global (WGS84) coordinate frame + altitude relative to mean sea level (MSL)."]
2246    MAV_FRAME_GLOBAL = 0,
2247    #[doc = "NED local tangent frame (x: North, y: East, z: Down) with origin fixed relative to earth."]
2248    MAV_FRAME_LOCAL_NED = 1,
2249    #[doc = "NOT a coordinate frame, indicates a mission command."]
2250    MAV_FRAME_MISSION = 2,
2251    #[doc = "Global (WGS84) coordinate frame + altitude relative to the home position."]
2252    MAV_FRAME_GLOBAL_RELATIVE_ALT = 3,
2253    #[doc = "ENU local tangent frame (x: East, y: North, z: Up) with origin fixed relative to earth."]
2254    MAV_FRAME_LOCAL_ENU = 4,
2255    #[deprecated = "Use MAV_FRAME_GLOBAL in COMMAND_INT (and elsewhere) as a synonymous replacement. See `MAV_FRAME_GLOBAL` (Deprecated since 2024-03)"]
2256    #[doc = "Global (WGS84) coordinate frame (scaled) + altitude relative to mean sea level (MSL)."]
2257    MAV_FRAME_GLOBAL_INT = 5,
2258    #[deprecated = "Use MAV_FRAME_GLOBAL_RELATIVE_ALT in COMMAND_INT (and elsewhere) as a synonymous replacement. See `MAV_FRAME_GLOBAL_RELATIVE_ALT` (Deprecated since 2024-03)"]
2259    #[doc = "Global (WGS84) coordinate frame (scaled) + altitude relative to the home position."]
2260    MAV_FRAME_GLOBAL_RELATIVE_ALT_INT = 6,
2261    #[doc = "NED local tangent frame (x: North, y: East, z: Down) with origin that travels with the vehicle."]
2262    MAV_FRAME_LOCAL_OFFSET_NED = 7,
2263    #[deprecated = " See `MAV_FRAME_BODY_FRD` (Deprecated since 2019-08)"]
2264    #[doc = "Same as MAV_FRAME_LOCAL_NED when used to represent position values. Same as MAV_FRAME_BODY_FRD when used with velocity/acceleration values."]
2265    MAV_FRAME_BODY_NED = 8,
2266    #[deprecated = " See `MAV_FRAME_BODY_FRD` (Deprecated since 2019-08)"]
2267    #[doc = "This is the same as MAV_FRAME_BODY_FRD."]
2268    MAV_FRAME_BODY_OFFSET_NED = 9,
2269    #[doc = "Global (WGS84) coordinate frame with AGL altitude (altitude at ground level)."]
2270    MAV_FRAME_GLOBAL_TERRAIN_ALT = 10,
2271    #[deprecated = "Use MAV_FRAME_GLOBAL_TERRAIN_ALT in COMMAND_INT (and elsewhere) as a synonymous replacement. See `MAV_FRAME_GLOBAL_TERRAIN_ALT` (Deprecated since 2024-03)"]
2272    #[doc = "Global (WGS84) coordinate frame (scaled) with AGL altitude (altitude at ground level)."]
2273    MAV_FRAME_GLOBAL_TERRAIN_ALT_INT = 11,
2274    #[doc = "FRD local frame aligned to the vehicle's attitude (x: Forward, y: Right, z: Down) with an origin that travels with vehicle."]
2275    MAV_FRAME_BODY_FRD = 12,
2276    #[deprecated = "  (Deprecated since 2019-04)"]
2277    #[doc = "MAV_FRAME_BODY_FLU - Body fixed frame of reference, Z-up (x: Forward, y: Left, z: Up)."]
2278    MAV_FRAME_RESERVED_13 = 13,
2279    #[deprecated = " See `MAV_FRAME_LOCAL_FRD` (Deprecated since 2019-04)"]
2280    #[doc = "MAV_FRAME_MOCAP_NED - Odometry local coordinate frame of data given by a motion capture system, Z-down (x: North, y: East, z: Down)."]
2281    MAV_FRAME_RESERVED_14 = 14,
2282    #[deprecated = " See `MAV_FRAME_LOCAL_FLU` (Deprecated since 2019-04)"]
2283    #[doc = "MAV_FRAME_MOCAP_ENU - Odometry local coordinate frame of data given by a motion capture system, Z-up (x: East, y: North, z: Up)."]
2284    MAV_FRAME_RESERVED_15 = 15,
2285    #[deprecated = " See `MAV_FRAME_LOCAL_FRD` (Deprecated since 2019-04)"]
2286    #[doc = "MAV_FRAME_VISION_NED - Odometry local coordinate frame of data given by a vision estimation system, Z-down (x: North, y: East, z: Down)."]
2287    MAV_FRAME_RESERVED_16 = 16,
2288    #[deprecated = " See `MAV_FRAME_LOCAL_FLU` (Deprecated since 2019-04)"]
2289    #[doc = "MAV_FRAME_VISION_ENU - Odometry local coordinate frame of data given by a vision estimation system, Z-up (x: East, y: North, z: Up)."]
2290    MAV_FRAME_RESERVED_17 = 17,
2291    #[deprecated = " See `MAV_FRAME_LOCAL_FRD` (Deprecated since 2019-04)"]
2292    #[doc = "MAV_FRAME_ESTIM_NED - Odometry local coordinate frame of data given by an estimator running onboard the vehicle, Z-down (x: North, y: East, z: Down)."]
2293    MAV_FRAME_RESERVED_18 = 18,
2294    #[deprecated = " See `MAV_FRAME_LOCAL_FLU` (Deprecated since 2019-04)"]
2295    #[doc = "MAV_FRAME_ESTIM_ENU - Odometry local coordinate frame of data given by an estimator running onboard the vehicle, Z-up (x: East, y: North, z: Up)."]
2296    MAV_FRAME_RESERVED_19 = 19,
2297    #[doc = "FRD local tangent frame (x: Forward, y: Right, z: Down) with origin fixed relative to earth. The forward axis is aligned to the front of the vehicle in the horizontal plane."]
2298    MAV_FRAME_LOCAL_FRD = 20,
2299    #[doc = "FLU local tangent frame (x: Forward, y: Left, z: Up) with origin fixed relative to earth. The forward axis is aligned to the front of the vehicle in the horizontal plane."]
2300    MAV_FRAME_LOCAL_FLU = 21,
2301}
2302impl MavFrame {
2303    pub const DEFAULT: Self = Self::MAV_FRAME_GLOBAL;
2304}
2305impl Default for MavFrame {
2306    fn default() -> Self {
2307        Self::DEFAULT
2308    }
2309}
2310#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2311#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2312#[cfg_attr(feature = "serde", serde(tag = "type"))]
2313#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2314#[repr(u32)]
2315#[doc = "MAV FTP error codes (<https://mavlink.io/en/services/ftp.html>)"]
2316pub enum MavFtpErr {
2317    #[doc = "None: No error"]
2318    MAV_FTP_ERR_NONE = 0,
2319    #[doc = "Fail: Unknown failure"]
2320    MAV_FTP_ERR_FAIL = 1,
2321    #[doc = "FailErrno: Command failed, Err number sent back in PayloadHeader.data[1]. \t\tThis is a file-system error number understood by the server operating system."]
2322    MAV_FTP_ERR_FAILERRNO = 2,
2323    #[doc = "InvalidDataSize: Payload size is invalid"]
2324    MAV_FTP_ERR_INVALIDDATASIZE = 3,
2325    #[doc = "InvalidSession: Session is not currently open"]
2326    MAV_FTP_ERR_INVALIDSESSION = 4,
2327    #[doc = "NoSessionsAvailable: All available sessions are already in use"]
2328    MAV_FTP_ERR_NOSESSIONSAVAILABLE = 5,
2329    #[doc = "EOF: Offset past end of file for ListDirectory and ReadFile commands"]
2330    MAV_FTP_ERR_EOF = 6,
2331    #[doc = "UnknownCommand: Unknown command / opcode"]
2332    MAV_FTP_ERR_UNKNOWNCOMMAND = 7,
2333    #[doc = "FileExists: File/directory already exists"]
2334    MAV_FTP_ERR_FILEEXISTS = 8,
2335    #[doc = "FileProtected: File/directory is write protected"]
2336    MAV_FTP_ERR_FILEPROTECTED = 9,
2337    #[doc = "FileNotFound: File/directory not found"]
2338    MAV_FTP_ERR_FILENOTFOUND = 10,
2339}
2340impl MavFtpErr {
2341    pub const DEFAULT: Self = Self::MAV_FTP_ERR_NONE;
2342}
2343impl Default for MavFtpErr {
2344    fn default() -> Self {
2345        Self::DEFAULT
2346    }
2347}
2348#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2349#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2350#[cfg_attr(feature = "serde", serde(tag = "type"))]
2351#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2352#[repr(u32)]
2353#[doc = "MAV FTP opcodes: <https://mavlink.io/en/services/ftp.html>"]
2354pub enum MavFtpOpcode {
2355    #[doc = "None. Ignored, always ACKed"]
2356    MAV_FTP_OPCODE_NONE = 0,
2357    #[doc = "TerminateSession: Terminates open Read session"]
2358    MAV_FTP_OPCODE_TERMINATESESSION = 1,
2359    #[doc = "ResetSessions: Terminates all open read sessions"]
2360    MAV_FTP_OPCODE_RESETSESSION = 2,
2361    #[doc = "ListDirectory. List files and directories in path from offset"]
2362    MAV_FTP_OPCODE_LISTDIRECTORY = 3,
2363    #[doc = "OpenFileRO: Opens file at path for reading, returns session"]
2364    MAV_FTP_OPCODE_OPENFILERO = 4,
2365    #[doc = "ReadFile: Reads size bytes from offset in session"]
2366    MAV_FTP_OPCODE_READFILE = 5,
2367    #[doc = "CreateFile: Creates file at path for writing, returns session"]
2368    MAV_FTP_OPCODE_CREATEFILE = 6,
2369    #[doc = "WriteFile: Writes size bytes to offset in session"]
2370    MAV_FTP_OPCODE_WRITEFILE = 7,
2371    #[doc = "RemoveFile: Remove file at path"]
2372    MAV_FTP_OPCODE_REMOVEFILE = 8,
2373    #[doc = "CreateDirectory: Creates directory at path"]
2374    MAV_FTP_OPCODE_CREATEDIRECTORY = 9,
2375    #[doc = "RemoveDirectory: Removes directory at path. The directory must be empty."]
2376    MAV_FTP_OPCODE_REMOVEDIRECTORY = 10,
2377    #[doc = "OpenFileWO: Opens file at path for writing, returns session"]
2378    MAV_FTP_OPCODE_OPENFILEWO = 11,
2379    #[doc = "TruncateFile: Truncate file at path to offset length"]
2380    MAV_FTP_OPCODE_TRUNCATEFILE = 12,
2381    #[doc = "Rename: Rename path1 to path2"]
2382    MAV_FTP_OPCODE_RENAME = 13,
2383    #[doc = "CalcFileCRC32: Calculate CRC32 for file at path"]
2384    MAV_FTP_OPCODE_CALCFILECRC = 14,
2385    #[doc = "BurstReadFile: Burst download session file"]
2386    MAV_FTP_OPCODE_BURSTREADFILE = 15,
2387    #[doc = "ACK: ACK response"]
2388    MAV_FTP_OPCODE_ACK = 128,
2389    #[doc = "NAK: NAK response"]
2390    MAV_FTP_OPCODE_NAK = 129,
2391}
2392impl MavFtpOpcode {
2393    pub const DEFAULT: Self = Self::MAV_FTP_OPCODE_NONE;
2394}
2395impl Default for MavFtpOpcode {
2396    fn default() -> Self {
2397        Self::DEFAULT
2398    }
2399}
2400#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2401#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2402#[cfg_attr(feature = "serde", serde(tag = "type"))]
2403#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2404#[repr(u32)]
2405#[doc = "Fuel types for use in FUEL_TYPE. Fuel types specify the units for the maximum, available and consumed fuel, and for the flow rates."]
2406pub enum MavFuelType {
2407    #[doc = "Not specified. Fuel levels are normalized (i.e. maximum is 1, and other levels are relative to 1)."]
2408    MAV_FUEL_TYPE_UNKNOWN = 0,
2409    #[doc = "A generic liquid fuel. Fuel levels are in millilitres (ml). Fuel rates are in millilitres/second."]
2410    MAV_FUEL_TYPE_LIQUID = 1,
2411    #[doc = "A gas tank. Fuel levels are in kilo-Pascal (kPa), and flow rates are in milliliters per second (ml/s)."]
2412    MAV_FUEL_TYPE_GAS = 2,
2413}
2414impl MavFuelType {
2415    pub const DEFAULT: Self = Self::MAV_FUEL_TYPE_UNKNOWN;
2416}
2417impl Default for MavFuelType {
2418    fn default() -> Self {
2419        Self::DEFAULT
2420    }
2421}
2422bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags to report status/failure cases for a power generator (used in GENERATOR_STATUS). Note that FAULTS are conditions that cause the generator to fail. Warnings are conditions that require attention before the next use (they indicate the system is not operating properly)."] pub struct MavGeneratorStatusFlag : u64 { # [doc = "Generator is off."] const MAV_GENERATOR_STATUS_FLAG_OFF = 1 ; # [doc = "Generator is ready to start generating power."] const MAV_GENERATOR_STATUS_FLAG_READY = 2 ; # [doc = "Generator is generating power."] const MAV_GENERATOR_STATUS_FLAG_GENERATING = 4 ; # [doc = "Generator is charging the batteries (generating enough power to charge and provide the load)."] const MAV_GENERATOR_STATUS_FLAG_CHARGING = 8 ; # [doc = "Generator is operating at a reduced maximum power."] const MAV_GENERATOR_STATUS_FLAG_REDUCED_POWER = 16 ; # [doc = "Generator is providing the maximum output."] const MAV_GENERATOR_STATUS_FLAG_MAXPOWER = 32 ; # [doc = "Generator is near the maximum operating temperature, cooling is insufficient."] const MAV_GENERATOR_STATUS_FLAG_OVERTEMP_WARNING = 64 ; # [doc = "Generator hit the maximum operating temperature and shutdown."] const MAV_GENERATOR_STATUS_FLAG_OVERTEMP_FAULT = 128 ; # [doc = "Power electronics are near the maximum operating temperature, cooling is insufficient."] const MAV_GENERATOR_STATUS_FLAG_ELECTRONICS_OVERTEMP_WARNING = 256 ; # [doc = "Power electronics hit the maximum operating temperature and shutdown."] const MAV_GENERATOR_STATUS_FLAG_ELECTRONICS_OVERTEMP_FAULT = 512 ; # [doc = "Power electronics experienced a fault and shutdown."] const MAV_GENERATOR_STATUS_FLAG_ELECTRONICS_FAULT = 1024 ; # [doc = "The power source supplying the generator failed e.g. mechanical generator stopped, tether is no longer providing power, solar cell is in shade, hydrogen reaction no longer happening."] const MAV_GENERATOR_STATUS_FLAG_POWERSOURCE_FAULT = 2048 ; # [doc = "Generator controller having communication problems."] const MAV_GENERATOR_STATUS_FLAG_COMMUNICATION_WARNING = 4096 ; # [doc = "Power electronic or generator cooling system error."] const MAV_GENERATOR_STATUS_FLAG_COOLING_WARNING = 8192 ; # [doc = "Generator controller power rail experienced a fault."] const MAV_GENERATOR_STATUS_FLAG_POWER_RAIL_FAULT = 16384 ; # [doc = "Generator controller exceeded the overcurrent threshold and shutdown to prevent damage."] const MAV_GENERATOR_STATUS_FLAG_OVERCURRENT_FAULT = 32768 ; # [doc = "Generator controller detected a high current going into the batteries and shutdown to prevent battery damage."] const MAV_GENERATOR_STATUS_FLAG_BATTERY_OVERCHARGE_CURRENT_FAULT = 65536 ; # [doc = "Generator controller exceeded it's overvoltage threshold and shutdown to prevent it exceeding the voltage rating."] const MAV_GENERATOR_STATUS_FLAG_OVERVOLTAGE_FAULT = 131072 ; # [doc = "Batteries are under voltage (generator will not start)."] const MAV_GENERATOR_STATUS_FLAG_BATTERY_UNDERVOLT_FAULT = 262144 ; # [doc = "Generator start is inhibited by e.g. a safety switch."] const MAV_GENERATOR_STATUS_FLAG_START_INHIBITED = 524288 ; # [doc = "Generator requires maintenance."] const MAV_GENERATOR_STATUS_FLAG_MAINTENANCE_REQUIRED = 1048576 ; # [doc = "Generator is not ready to generate yet."] const MAV_GENERATOR_STATUS_FLAG_WARMING_UP = 2097152 ; # [doc = "Generator is idle."] const MAV_GENERATOR_STATUS_FLAG_IDLE = 4194304 ; } }
2423impl MavGeneratorStatusFlag {
2424    pub const DEFAULT: Self = Self::MAV_GENERATOR_STATUS_FLAG_OFF;
2425}
2426impl Default for MavGeneratorStatusFlag {
2427    fn default() -> Self {
2428        Self::DEFAULT
2429    }
2430}
2431#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2432#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2433#[cfg_attr(feature = "serde", serde(tag = "type"))]
2434#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2435#[repr(u32)]
2436#[doc = "Actions that may be specified in MAV_CMD_OVERRIDE_GOTO to override mission execution."]
2437pub enum MavGoto {
2438    #[doc = "Hold at the current position."]
2439    MAV_GOTO_DO_HOLD = 0,
2440    #[doc = "Continue with the next item in mission execution."]
2441    MAV_GOTO_DO_CONTINUE = 1,
2442    #[doc = "Hold at the current position of the system"]
2443    MAV_GOTO_HOLD_AT_CURRENT_POSITION = 2,
2444    #[doc = "Hold at the position specified in the parameters of the DO_HOLD action"]
2445    MAV_GOTO_HOLD_AT_SPECIFIED_POSITION = 3,
2446}
2447impl MavGoto {
2448    pub const DEFAULT: Self = Self::MAV_GOTO_DO_HOLD;
2449}
2450impl Default for MavGoto {
2451    fn default() -> Self {
2452        Self::DEFAULT
2453    }
2454}
2455#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2456#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2457#[cfg_attr(feature = "serde", serde(tag = "type"))]
2458#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2459#[repr(u32)]
2460#[doc = "Enumeration of landed detector states"]
2461pub enum MavLandedState {
2462    #[doc = "MAV landed state is unknown"]
2463    MAV_LANDED_STATE_UNDEFINED = 0,
2464    #[doc = "MAV is landed (on ground)"]
2465    MAV_LANDED_STATE_ON_GROUND = 1,
2466    #[doc = "MAV is in air"]
2467    MAV_LANDED_STATE_IN_AIR = 2,
2468    #[doc = "MAV currently taking off"]
2469    MAV_LANDED_STATE_TAKEOFF = 3,
2470    #[doc = "MAV currently landing"]
2471    MAV_LANDED_STATE_LANDING = 4,
2472}
2473impl MavLandedState {
2474    pub const DEFAULT: Self = Self::MAV_LANDED_STATE_UNDEFINED;
2475}
2476impl Default for MavLandedState {
2477    fn default() -> Self {
2478        Self::DEFAULT
2479    }
2480}
2481#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2482#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2483#[cfg_attr(feature = "serde", serde(tag = "type"))]
2484#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2485#[repr(u32)]
2486#[doc = "Result of mission operation (in a MISSION_ACK message)."]
2487pub enum MavMissionResult {
2488    #[doc = "mission accepted OK"]
2489    MAV_MISSION_ACCEPTED = 0,
2490    #[doc = "Generic error / not accepting mission commands at all right now."]
2491    MAV_MISSION_ERROR = 1,
2492    #[doc = "Coordinate frame is not supported."]
2493    MAV_MISSION_UNSUPPORTED_FRAME = 2,
2494    #[doc = "Command is not supported."]
2495    MAV_MISSION_UNSUPPORTED = 3,
2496    #[doc = "Mission items exceed storage space."]
2497    MAV_MISSION_NO_SPACE = 4,
2498    #[doc = "One of the parameters has an invalid value."]
2499    MAV_MISSION_INVALID = 5,
2500    #[doc = "param1 has an invalid value."]
2501    MAV_MISSION_INVALID_PARAM1 = 6,
2502    #[doc = "param2 has an invalid value."]
2503    MAV_MISSION_INVALID_PARAM2 = 7,
2504    #[doc = "param3 has an invalid value."]
2505    MAV_MISSION_INVALID_PARAM3 = 8,
2506    #[doc = "param4 has an invalid value."]
2507    MAV_MISSION_INVALID_PARAM4 = 9,
2508    #[doc = "x / param5 has an invalid value."]
2509    MAV_MISSION_INVALID_PARAM5_X = 10,
2510    #[doc = "y / param6 has an invalid value."]
2511    MAV_MISSION_INVALID_PARAM6_Y = 11,
2512    #[doc = "z / param7 has an invalid value."]
2513    MAV_MISSION_INVALID_PARAM7 = 12,
2514    #[doc = "Mission item received out of sequence"]
2515    MAV_MISSION_INVALID_SEQUENCE = 13,
2516    #[doc = "Not accepting any mission commands from this communication partner."]
2517    MAV_MISSION_DENIED = 14,
2518    #[doc = "Current mission operation cancelled (e.g. mission upload, mission download)."]
2519    MAV_MISSION_OPERATION_CANCELLED = 15,
2520}
2521impl MavMissionResult {
2522    pub const DEFAULT: Self = Self::MAV_MISSION_ACCEPTED;
2523}
2524impl Default for MavMissionResult {
2525    fn default() -> Self {
2526        Self::DEFAULT
2527    }
2528}
2529#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2530#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2531#[cfg_attr(feature = "serde", serde(tag = "type"))]
2532#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2533#[repr(u32)]
2534#[doc = "Type of mission items being requested/sent in mission protocol."]
2535pub enum MavMissionType {
2536    #[doc = "Items are mission commands for main mission."]
2537    MAV_MISSION_TYPE_MISSION = 0,
2538    #[doc = "Specifies GeoFence area(s). Items are MAV_CMD_NAV_FENCE_ GeoFence items."]
2539    MAV_MISSION_TYPE_FENCE = 1,
2540    #[doc = "Specifies the rally points for the vehicle. Rally points are alternative RTL points. Items are MAV_CMD_NAV_RALLY_POINT rally point items."]
2541    MAV_MISSION_TYPE_RALLY = 2,
2542    #[doc = "Only used in MISSION_CLEAR_ALL to clear all mission types."]
2543    MAV_MISSION_TYPE_ALL = 255,
2544}
2545impl MavMissionType {
2546    pub const DEFAULT: Self = Self::MAV_MISSION_TYPE_MISSION;
2547}
2548impl Default for MavMissionType {
2549    fn default() -> Self {
2550        Self::DEFAULT
2551    }
2552}
2553#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2554#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2555#[cfg_attr(feature = "serde", serde(tag = "type"))]
2556#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2557#[repr(u32)]
2558#[doc = "These defines are predefined OR-combined mode flags. There is no need to use values from this enum, but it                simplifies the use of the mode flags. Note that manual input is enabled in all modes as a safety override."]
2559pub enum MavMode {
2560    #[doc = "System is not ready to fly, booting, calibrating, etc. No flag is set."]
2561    MAV_MODE_PREFLIGHT = 0,
2562    #[doc = "System is allowed to be active, under assisted RC control."]
2563    MAV_MODE_STABILIZE_DISARMED = 80,
2564    #[doc = "System is allowed to be active, under assisted RC control."]
2565    MAV_MODE_STABILIZE_ARMED = 208,
2566    #[doc = "System is allowed to be active, under manual (RC) control, no stabilization"]
2567    MAV_MODE_MANUAL_DISARMED = 64,
2568    #[doc = "System is allowed to be active, under manual (RC) control, no stabilization"]
2569    MAV_MODE_MANUAL_ARMED = 192,
2570    #[doc = "System is allowed to be active, under autonomous control, manual setpoint"]
2571    MAV_MODE_GUIDED_DISARMED = 88,
2572    #[doc = "System is allowed to be active, under autonomous control, manual setpoint"]
2573    MAV_MODE_GUIDED_ARMED = 216,
2574    #[doc = "System is allowed to be active, under autonomous control and navigation (the trajectory is decided onboard and not pre-programmed by waypoints)"]
2575    MAV_MODE_AUTO_DISARMED = 92,
2576    #[doc = "System is allowed to be active, under autonomous control and navigation (the trajectory is decided onboard and not pre-programmed by waypoints)"]
2577    MAV_MODE_AUTO_ARMED = 220,
2578    #[doc = "UNDEFINED mode. This solely depends on the autopilot - use with caution, intended for developers only."]
2579    MAV_MODE_TEST_DISARMED = 66,
2580    #[doc = "UNDEFINED mode. This solely depends on the autopilot - use with caution, intended for developers only."]
2581    MAV_MODE_TEST_ARMED = 194,
2582}
2583impl MavMode {
2584    pub const DEFAULT: Self = Self::MAV_MODE_PREFLIGHT;
2585}
2586impl Default for MavMode {
2587    fn default() -> Self {
2588        Self::DEFAULT
2589    }
2590}
2591bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These flags encode the MAV mode."] pub struct MavModeFlag : u8 { # [doc = "0b10000000 MAV safety set to armed. Motors are enabled / running / can start. Ready to fly. Additional note: this flag is to be ignore when sent in the command MAV_CMD_DO_SET_MODE and MAV_CMD_COMPONENT_ARM_DISARM shall be used instead. The flag can still be used to report the armed state."] const MAV_MODE_FLAG_SAFETY_ARMED = 128 ; # [doc = "0b01000000 remote control input is enabled."] const MAV_MODE_FLAG_MANUAL_INPUT_ENABLED = 64 ; # [doc = "0b00100000 hardware in the loop simulation. All motors / actuators are blocked, but internal software is full operational."] const MAV_MODE_FLAG_HIL_ENABLED = 32 ; # [doc = "0b00010000 system stabilizes electronically its attitude (and optionally position). It needs however further control inputs to move around."] const MAV_MODE_FLAG_STABILIZE_ENABLED = 16 ; # [doc = "0b00001000 guided mode enabled, system flies waypoints / mission items."] const MAV_MODE_FLAG_GUIDED_ENABLED = 8 ; # [doc = "0b00000100 autonomous mode enabled, system finds its own goal positions. Guided flag can be set or not, depends on the actual implementation."] const MAV_MODE_FLAG_AUTO_ENABLED = 4 ; # [doc = "0b00000010 system has a test mode enabled. This flag is intended for temporary system tests and should not be used for stable implementations."] const MAV_MODE_FLAG_TEST_ENABLED = 2 ; # [doc = "0b00000001 Reserved for future use."] const MAV_MODE_FLAG_CUSTOM_MODE_ENABLED = 1 ; } }
2592impl MavModeFlag {
2593    pub const DEFAULT: Self = Self::MAV_MODE_FLAG_SAFETY_ARMED;
2594}
2595impl Default for MavModeFlag {
2596    fn default() -> Self {
2597        Self::DEFAULT
2598    }
2599}
2600#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2601#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2602#[cfg_attr(feature = "serde", serde(tag = "type"))]
2603#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2604#[repr(u32)]
2605#[doc = "These values encode the bit positions of the decode position. These values can be used to read the value of a flag bit by combining the base_mode variable with AND with the flag position value. The result will be either 0 or 1, depending on if the flag is set or not."]
2606pub enum MavModeFlagDecodePosition {
2607    #[doc = "First bit:  10000000"]
2608    MAV_MODE_FLAG_DECODE_POSITION_SAFETY = 128,
2609    #[doc = "Second bit: 01000000"]
2610    MAV_MODE_FLAG_DECODE_POSITION_MANUAL = 64,
2611    #[doc = "Third bit:  00100000"]
2612    MAV_MODE_FLAG_DECODE_POSITION_HIL = 32,
2613    #[doc = "Fourth bit: 00010000"]
2614    MAV_MODE_FLAG_DECODE_POSITION_STABILIZE = 16,
2615    #[doc = "Fifth bit:  00001000"]
2616    MAV_MODE_FLAG_DECODE_POSITION_GUIDED = 8,
2617    #[doc = "Sixth bit:   00000100"]
2618    MAV_MODE_FLAG_DECODE_POSITION_AUTO = 4,
2619    #[doc = "Seventh bit: 00000010"]
2620    MAV_MODE_FLAG_DECODE_POSITION_TEST = 2,
2621    #[doc = "Eighth bit: 00000001"]
2622    MAV_MODE_FLAG_DECODE_POSITION_CUSTOM_MODE = 1,
2623}
2624impl MavModeFlagDecodePosition {
2625    pub const DEFAULT: Self = Self::MAV_MODE_FLAG_DECODE_POSITION_SAFETY;
2626}
2627impl Default for MavModeFlagDecodePosition {
2628    fn default() -> Self {
2629        Self::DEFAULT
2630    }
2631}
2632bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Mode properties."] pub struct MavModeProperty : u32 { # [doc = "If set, this mode is an advanced mode.           For example a rate-controlled manual mode might be advanced, whereas a position-controlled manual mode is not.           A GCS can optionally use this flag to configure the UI for its intended users."] const MAV_MODE_PROPERTY_ADVANCED = 1 ; # [doc = "If set, this mode should not be added to the list of selectable modes.           The mode might still be selected by the FC directly (for example as part of a failsafe)."] const MAV_MODE_PROPERTY_NOT_USER_SELECTABLE = 2 ; # [doc = "If set, this mode is automatically controlled (it may use but does not require a manual controller).           If unset the mode is a assumed to require user input (be a manual mode)."] const MAV_MODE_PROPERTY_AUTO_MODE = 4 ; } }
2633impl MavModeProperty {
2634    pub const DEFAULT: Self = Self::MAV_MODE_PROPERTY_ADVANCED;
2635}
2636impl Default for MavModeProperty {
2637    fn default() -> Self {
2638        Self::DEFAULT
2639    }
2640}
2641#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2642#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2643#[cfg_attr(feature = "serde", serde(tag = "type"))]
2644#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2645#[repr(u32)]
2646#[deprecated = " See `GIMBAL_MANAGER_FLAGS` (Deprecated since 2020-01)"]
2647#[doc = "Enumeration of possible mount operation modes. This message is used by obsolete/deprecated gimbal messages."]
2648pub enum MavMountMode {
2649    #[doc = "Load and keep safe position (Roll,Pitch,Yaw) from permanent memory and stop stabilization"]
2650    MAV_MOUNT_MODE_RETRACT = 0,
2651    #[doc = "Load and keep neutral position (Roll,Pitch,Yaw) from permanent memory."]
2652    MAV_MOUNT_MODE_NEUTRAL = 1,
2653    #[doc = "Load neutral position and start MAVLink Roll,Pitch,Yaw control with stabilization"]
2654    MAV_MOUNT_MODE_MAVLINK_TARGETING = 2,
2655    #[doc = "Load neutral position and start RC Roll,Pitch,Yaw control with stabilization"]
2656    MAV_MOUNT_MODE_RC_TARGETING = 3,
2657    #[doc = "Load neutral position and start to point to Lat,Lon,Alt"]
2658    MAV_MOUNT_MODE_GPS_POINT = 4,
2659    #[doc = "Gimbal tracks system with specified system ID"]
2660    MAV_MOUNT_MODE_SYSID_TARGET = 5,
2661    #[doc = "Gimbal tracks home position"]
2662    MAV_MOUNT_MODE_HOME_LOCATION = 6,
2663}
2664impl MavMountMode {
2665    pub const DEFAULT: Self = Self::MAV_MOUNT_MODE_RETRACT;
2666}
2667impl Default for MavMountMode {
2668    fn default() -> Self {
2669        Self::DEFAULT
2670    }
2671}
2672#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2673#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2674#[cfg_attr(feature = "serde", serde(tag = "type"))]
2675#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2676#[repr(u32)]
2677pub enum MavOdidArmStatus {
2678    #[doc = "Passing arming checks."]
2679    MAV_ODID_ARM_STATUS_GOOD_TO_ARM = 0,
2680    #[doc = "Generic arming failure, see error string for details."]
2681    MAV_ODID_ARM_STATUS_PRE_ARM_FAIL_GENERIC = 1,
2682}
2683impl MavOdidArmStatus {
2684    pub const DEFAULT: Self = Self::MAV_ODID_ARM_STATUS_GOOD_TO_ARM;
2685}
2686impl Default for MavOdidArmStatus {
2687    fn default() -> Self {
2688        Self::DEFAULT
2689    }
2690}
2691#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2692#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2693#[cfg_attr(feature = "serde", serde(tag = "type"))]
2694#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2695#[repr(u32)]
2696pub enum MavOdidAuthType {
2697    #[doc = "No authentication type is specified."]
2698    MAV_ODID_AUTH_TYPE_NONE = 0,
2699    #[doc = "Signature for the UAS (Unmanned Aircraft System) ID."]
2700    MAV_ODID_AUTH_TYPE_UAS_ID_SIGNATURE = 1,
2701    #[doc = "Signature for the Operator ID."]
2702    MAV_ODID_AUTH_TYPE_OPERATOR_ID_SIGNATURE = 2,
2703    #[doc = "Signature for the entire message set."]
2704    MAV_ODID_AUTH_TYPE_MESSAGE_SET_SIGNATURE = 3,
2705    #[doc = "Authentication is provided by Network Remote ID."]
2706    MAV_ODID_AUTH_TYPE_NETWORK_REMOTE_ID = 4,
2707    #[doc = "The exact authentication type is indicated by the first byte of authentication_data and these type values are managed by ICAO."]
2708    MAV_ODID_AUTH_TYPE_SPECIFIC_AUTHENTICATION = 5,
2709}
2710impl MavOdidAuthType {
2711    pub const DEFAULT: Self = Self::MAV_ODID_AUTH_TYPE_NONE;
2712}
2713impl Default for MavOdidAuthType {
2714    fn default() -> Self {
2715        Self::DEFAULT
2716    }
2717}
2718#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2719#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2720#[cfg_attr(feature = "serde", serde(tag = "type"))]
2721#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2722#[repr(u32)]
2723pub enum MavOdidCategoryEu {
2724    #[doc = "The category for the UA, according to the EU specification, is undeclared."]
2725    MAV_ODID_CATEGORY_EU_UNDECLARED = 0,
2726    #[doc = "The category for the UA, according to the EU specification, is the Open category."]
2727    MAV_ODID_CATEGORY_EU_OPEN = 1,
2728    #[doc = "The category for the UA, according to the EU specification, is the Specific category."]
2729    MAV_ODID_CATEGORY_EU_SPECIFIC = 2,
2730    #[doc = "The category for the UA, according to the EU specification, is the Certified category."]
2731    MAV_ODID_CATEGORY_EU_CERTIFIED = 3,
2732}
2733impl MavOdidCategoryEu {
2734    pub const DEFAULT: Self = Self::MAV_ODID_CATEGORY_EU_UNDECLARED;
2735}
2736impl Default for MavOdidCategoryEu {
2737    fn default() -> Self {
2738        Self::DEFAULT
2739    }
2740}
2741#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2742#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2743#[cfg_attr(feature = "serde", serde(tag = "type"))]
2744#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2745#[repr(u32)]
2746pub enum MavOdidClassEu {
2747    #[doc = "The class for the UA, according to the EU specification, is undeclared."]
2748    MAV_ODID_CLASS_EU_UNDECLARED = 0,
2749    #[doc = "The class for the UA, according to the EU specification, is Class 0."]
2750    MAV_ODID_CLASS_EU_CLASS_0 = 1,
2751    #[doc = "The class for the UA, according to the EU specification, is Class 1."]
2752    MAV_ODID_CLASS_EU_CLASS_1 = 2,
2753    #[doc = "The class for the UA, according to the EU specification, is Class 2."]
2754    MAV_ODID_CLASS_EU_CLASS_2 = 3,
2755    #[doc = "The class for the UA, according to the EU specification, is Class 3."]
2756    MAV_ODID_CLASS_EU_CLASS_3 = 4,
2757    #[doc = "The class for the UA, according to the EU specification, is Class 4."]
2758    MAV_ODID_CLASS_EU_CLASS_4 = 5,
2759    #[doc = "The class for the UA, according to the EU specification, is Class 5."]
2760    MAV_ODID_CLASS_EU_CLASS_5 = 6,
2761    #[doc = "The class for the UA, according to the EU specification, is Class 6."]
2762    MAV_ODID_CLASS_EU_CLASS_6 = 7,
2763}
2764impl MavOdidClassEu {
2765    pub const DEFAULT: Self = Self::MAV_ODID_CLASS_EU_UNDECLARED;
2766}
2767impl Default for MavOdidClassEu {
2768    fn default() -> Self {
2769        Self::DEFAULT
2770    }
2771}
2772#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2773#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2774#[cfg_attr(feature = "serde", serde(tag = "type"))]
2775#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2776#[repr(u32)]
2777pub enum MavOdidClassificationType {
2778    #[doc = "The classification type for the UA is undeclared."]
2779    MAV_ODID_CLASSIFICATION_TYPE_UNDECLARED = 0,
2780    #[doc = "The classification type for the UA follows EU (European Union) specifications."]
2781    MAV_ODID_CLASSIFICATION_TYPE_EU = 1,
2782}
2783impl MavOdidClassificationType {
2784    pub const DEFAULT: Self = Self::MAV_ODID_CLASSIFICATION_TYPE_UNDECLARED;
2785}
2786impl Default for MavOdidClassificationType {
2787    fn default() -> Self {
2788        Self::DEFAULT
2789    }
2790}
2791#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2792#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2793#[cfg_attr(feature = "serde", serde(tag = "type"))]
2794#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2795#[repr(u32)]
2796pub enum MavOdidDescType {
2797    #[doc = "Optional free-form text description of the purpose of the flight."]
2798    MAV_ODID_DESC_TYPE_TEXT = 0,
2799    #[doc = "Optional additional clarification when status == MAV_ODID_STATUS_EMERGENCY."]
2800    MAV_ODID_DESC_TYPE_EMERGENCY = 1,
2801    #[doc = "Optional additional clarification when status != MAV_ODID_STATUS_EMERGENCY."]
2802    MAV_ODID_DESC_TYPE_EXTENDED_STATUS = 2,
2803}
2804impl MavOdidDescType {
2805    pub const DEFAULT: Self = Self::MAV_ODID_DESC_TYPE_TEXT;
2806}
2807impl Default for MavOdidDescType {
2808    fn default() -> Self {
2809        Self::DEFAULT
2810    }
2811}
2812#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2813#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2814#[cfg_attr(feature = "serde", serde(tag = "type"))]
2815#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2816#[repr(u32)]
2817pub enum MavOdidHeightRef {
2818    #[doc = "The height field is relative to the take-off location."]
2819    MAV_ODID_HEIGHT_REF_OVER_TAKEOFF = 0,
2820    #[doc = "The height field is relative to ground."]
2821    MAV_ODID_HEIGHT_REF_OVER_GROUND = 1,
2822}
2823impl MavOdidHeightRef {
2824    pub const DEFAULT: Self = Self::MAV_ODID_HEIGHT_REF_OVER_TAKEOFF;
2825}
2826impl Default for MavOdidHeightRef {
2827    fn default() -> Self {
2828        Self::DEFAULT
2829    }
2830}
2831#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2832#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2833#[cfg_attr(feature = "serde", serde(tag = "type"))]
2834#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2835#[repr(u32)]
2836pub enum MavOdidHorAcc {
2837    #[doc = "The horizontal accuracy is unknown."]
2838    MAV_ODID_HOR_ACC_UNKNOWN = 0,
2839    #[doc = "The horizontal accuracy is smaller than 10 Nautical Miles. 18.52 km."]
2840    MAV_ODID_HOR_ACC_10NM = 1,
2841    #[doc = "The horizontal accuracy is smaller than 4 Nautical Miles. 7.408 km."]
2842    MAV_ODID_HOR_ACC_4NM = 2,
2843    #[doc = "The horizontal accuracy is smaller than 2 Nautical Miles. 3.704 km."]
2844    MAV_ODID_HOR_ACC_2NM = 3,
2845    #[doc = "The horizontal accuracy is smaller than 1 Nautical Miles. 1.852 km."]
2846    MAV_ODID_HOR_ACC_1NM = 4,
2847    #[doc = "The horizontal accuracy is smaller than 0.5 Nautical Miles. 926 m."]
2848    MAV_ODID_HOR_ACC_0_5NM = 5,
2849    #[doc = "The horizontal accuracy is smaller than 0.3 Nautical Miles. 555.6 m."]
2850    MAV_ODID_HOR_ACC_0_3NM = 6,
2851    #[doc = "The horizontal accuracy is smaller than 0.1 Nautical Miles. 185.2 m."]
2852    MAV_ODID_HOR_ACC_0_1NM = 7,
2853    #[doc = "The horizontal accuracy is smaller than 0.05 Nautical Miles. 92.6 m."]
2854    MAV_ODID_HOR_ACC_0_05NM = 8,
2855    #[doc = "The horizontal accuracy is smaller than 30 meter."]
2856    MAV_ODID_HOR_ACC_30_METER = 9,
2857    #[doc = "The horizontal accuracy is smaller than 10 meter."]
2858    MAV_ODID_HOR_ACC_10_METER = 10,
2859    #[doc = "The horizontal accuracy is smaller than 3 meter."]
2860    MAV_ODID_HOR_ACC_3_METER = 11,
2861    #[doc = "The horizontal accuracy is smaller than 1 meter."]
2862    MAV_ODID_HOR_ACC_1_METER = 12,
2863}
2864impl MavOdidHorAcc {
2865    pub const DEFAULT: Self = Self::MAV_ODID_HOR_ACC_UNKNOWN;
2866}
2867impl Default for MavOdidHorAcc {
2868    fn default() -> Self {
2869        Self::DEFAULT
2870    }
2871}
2872#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2873#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2874#[cfg_attr(feature = "serde", serde(tag = "type"))]
2875#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2876#[repr(u32)]
2877pub enum MavOdidIdType {
2878    #[doc = "No type defined."]
2879    MAV_ODID_ID_TYPE_NONE = 0,
2880    #[doc = "Manufacturer Serial Number (ANSI/CTA-2063 format)."]
2881    MAV_ODID_ID_TYPE_SERIAL_NUMBER = 1,
2882    #[doc = "CAA (Civil Aviation Authority) registered ID. Format: [ICAO Country Code].[CAA Assigned ID]."]
2883    MAV_ODID_ID_TYPE_CAA_REGISTRATION_ID = 2,
2884    #[doc = "UTM (Unmanned Traffic Management) assigned UUID (RFC4122)."]
2885    MAV_ODID_ID_TYPE_UTM_ASSIGNED_UUID = 3,
2886    #[doc = "A 20 byte ID for a specific flight/session. The exact ID type is indicated by the first byte of uas_id and these type values are managed by ICAO."]
2887    MAV_ODID_ID_TYPE_SPECIFIC_SESSION_ID = 4,
2888}
2889impl MavOdidIdType {
2890    pub const DEFAULT: Self = Self::MAV_ODID_ID_TYPE_NONE;
2891}
2892impl Default for MavOdidIdType {
2893    fn default() -> Self {
2894        Self::DEFAULT
2895    }
2896}
2897#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2898#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2899#[cfg_attr(feature = "serde", serde(tag = "type"))]
2900#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2901#[repr(u32)]
2902pub enum MavOdidOperatorIdType {
2903    #[doc = "CAA (Civil Aviation Authority) registered operator ID."]
2904    MAV_ODID_OPERATOR_ID_TYPE_CAA = 0,
2905}
2906impl MavOdidOperatorIdType {
2907    pub const DEFAULT: Self = Self::MAV_ODID_OPERATOR_ID_TYPE_CAA;
2908}
2909impl Default for MavOdidOperatorIdType {
2910    fn default() -> Self {
2911        Self::DEFAULT
2912    }
2913}
2914#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2915#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2916#[cfg_attr(feature = "serde", serde(tag = "type"))]
2917#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2918#[repr(u32)]
2919pub enum MavOdidOperatorLocationType {
2920    #[doc = "The location/altitude of the operator is the same as the take-off location."]
2921    MAV_ODID_OPERATOR_LOCATION_TYPE_TAKEOFF = 0,
2922    #[doc = "The location/altitude of the operator is dynamic. E.g. based on live GNSS data."]
2923    MAV_ODID_OPERATOR_LOCATION_TYPE_LIVE_GNSS = 1,
2924    #[doc = "The location/altitude of the operator are fixed values."]
2925    MAV_ODID_OPERATOR_LOCATION_TYPE_FIXED = 2,
2926}
2927impl MavOdidOperatorLocationType {
2928    pub const DEFAULT: Self = Self::MAV_ODID_OPERATOR_LOCATION_TYPE_TAKEOFF;
2929}
2930impl Default for MavOdidOperatorLocationType {
2931    fn default() -> Self {
2932        Self::DEFAULT
2933    }
2934}
2935#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2936#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2937#[cfg_attr(feature = "serde", serde(tag = "type"))]
2938#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2939#[repr(u32)]
2940pub enum MavOdidSpeedAcc {
2941    #[doc = "The speed accuracy is unknown."]
2942    MAV_ODID_SPEED_ACC_UNKNOWN = 0,
2943    #[doc = "The speed accuracy is smaller than 10 meters per second."]
2944    MAV_ODID_SPEED_ACC_10_METERS_PER_SECOND = 1,
2945    #[doc = "The speed accuracy is smaller than 3 meters per second."]
2946    MAV_ODID_SPEED_ACC_3_METERS_PER_SECOND = 2,
2947    #[doc = "The speed accuracy is smaller than 1 meters per second."]
2948    MAV_ODID_SPEED_ACC_1_METERS_PER_SECOND = 3,
2949    #[doc = "The speed accuracy is smaller than 0.3 meters per second."]
2950    MAV_ODID_SPEED_ACC_0_3_METERS_PER_SECOND = 4,
2951}
2952impl MavOdidSpeedAcc {
2953    pub const DEFAULT: Self = Self::MAV_ODID_SPEED_ACC_UNKNOWN;
2954}
2955impl Default for MavOdidSpeedAcc {
2956    fn default() -> Self {
2957        Self::DEFAULT
2958    }
2959}
2960#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2961#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2962#[cfg_attr(feature = "serde", serde(tag = "type"))]
2963#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2964#[repr(u32)]
2965pub enum MavOdidStatus {
2966    #[doc = "The status of the (UA) Unmanned Aircraft is undefined."]
2967    MAV_ODID_STATUS_UNDECLARED = 0,
2968    #[doc = "The UA is on the ground."]
2969    MAV_ODID_STATUS_GROUND = 1,
2970    #[doc = "The UA is in the air."]
2971    MAV_ODID_STATUS_AIRBORNE = 2,
2972    #[doc = "The UA is having an emergency."]
2973    MAV_ODID_STATUS_EMERGENCY = 3,
2974    #[doc = "The remote ID system is failing or unreliable in some way."]
2975    MAV_ODID_STATUS_REMOTE_ID_SYSTEM_FAILURE = 4,
2976}
2977impl MavOdidStatus {
2978    pub const DEFAULT: Self = Self::MAV_ODID_STATUS_UNDECLARED;
2979}
2980impl Default for MavOdidStatus {
2981    fn default() -> Self {
2982        Self::DEFAULT
2983    }
2984}
2985#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2986#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2987#[cfg_attr(feature = "serde", serde(tag = "type"))]
2988#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2989#[repr(u32)]
2990pub enum MavOdidTimeAcc {
2991    #[doc = "The timestamp accuracy is unknown."]
2992    MAV_ODID_TIME_ACC_UNKNOWN = 0,
2993    #[doc = "The timestamp accuracy is smaller than or equal to 0.1 second."]
2994    MAV_ODID_TIME_ACC_0_1_SECOND = 1,
2995    #[doc = "The timestamp accuracy is smaller than or equal to 0.2 second."]
2996    MAV_ODID_TIME_ACC_0_2_SECOND = 2,
2997    #[doc = "The timestamp accuracy is smaller than or equal to 0.3 second."]
2998    MAV_ODID_TIME_ACC_0_3_SECOND = 3,
2999    #[doc = "The timestamp accuracy is smaller than or equal to 0.4 second."]
3000    MAV_ODID_TIME_ACC_0_4_SECOND = 4,
3001    #[doc = "The timestamp accuracy is smaller than or equal to 0.5 second."]
3002    MAV_ODID_TIME_ACC_0_5_SECOND = 5,
3003    #[doc = "The timestamp accuracy is smaller than or equal to 0.6 second."]
3004    MAV_ODID_TIME_ACC_0_6_SECOND = 6,
3005    #[doc = "The timestamp accuracy is smaller than or equal to 0.7 second."]
3006    MAV_ODID_TIME_ACC_0_7_SECOND = 7,
3007    #[doc = "The timestamp accuracy is smaller than or equal to 0.8 second."]
3008    MAV_ODID_TIME_ACC_0_8_SECOND = 8,
3009    #[doc = "The timestamp accuracy is smaller than or equal to 0.9 second."]
3010    MAV_ODID_TIME_ACC_0_9_SECOND = 9,
3011    #[doc = "The timestamp accuracy is smaller than or equal to 1.0 second."]
3012    MAV_ODID_TIME_ACC_1_0_SECOND = 10,
3013    #[doc = "The timestamp accuracy is smaller than or equal to 1.1 second."]
3014    MAV_ODID_TIME_ACC_1_1_SECOND = 11,
3015    #[doc = "The timestamp accuracy is smaller than or equal to 1.2 second."]
3016    MAV_ODID_TIME_ACC_1_2_SECOND = 12,
3017    #[doc = "The timestamp accuracy is smaller than or equal to 1.3 second."]
3018    MAV_ODID_TIME_ACC_1_3_SECOND = 13,
3019    #[doc = "The timestamp accuracy is smaller than or equal to 1.4 second."]
3020    MAV_ODID_TIME_ACC_1_4_SECOND = 14,
3021    #[doc = "The timestamp accuracy is smaller than or equal to 1.5 second."]
3022    MAV_ODID_TIME_ACC_1_5_SECOND = 15,
3023}
3024impl MavOdidTimeAcc {
3025    pub const DEFAULT: Self = Self::MAV_ODID_TIME_ACC_UNKNOWN;
3026}
3027impl Default for MavOdidTimeAcc {
3028    fn default() -> Self {
3029        Self::DEFAULT
3030    }
3031}
3032#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3033#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3034#[cfg_attr(feature = "serde", serde(tag = "type"))]
3035#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3036#[repr(u32)]
3037pub enum MavOdidUaType {
3038    #[doc = "No UA (Unmanned Aircraft) type defined."]
3039    MAV_ODID_UA_TYPE_NONE = 0,
3040    #[doc = "Aeroplane/Airplane. Fixed wing."]
3041    MAV_ODID_UA_TYPE_AEROPLANE = 1,
3042    #[doc = "Helicopter or multirotor."]
3043    MAV_ODID_UA_TYPE_HELICOPTER_OR_MULTIROTOR = 2,
3044    #[doc = "Gyroplane."]
3045    MAV_ODID_UA_TYPE_GYROPLANE = 3,
3046    #[doc = "VTOL (Vertical Take-Off and Landing). Fixed wing aircraft that can take off vertically."]
3047    MAV_ODID_UA_TYPE_HYBRID_LIFT = 4,
3048    #[doc = "Ornithopter."]
3049    MAV_ODID_UA_TYPE_ORNITHOPTER = 5,
3050    #[doc = "Glider."]
3051    MAV_ODID_UA_TYPE_GLIDER = 6,
3052    #[doc = "Kite."]
3053    MAV_ODID_UA_TYPE_KITE = 7,
3054    #[doc = "Free Balloon."]
3055    MAV_ODID_UA_TYPE_FREE_BALLOON = 8,
3056    #[doc = "Captive Balloon."]
3057    MAV_ODID_UA_TYPE_CAPTIVE_BALLOON = 9,
3058    #[doc = "Airship. E.g. a blimp."]
3059    MAV_ODID_UA_TYPE_AIRSHIP = 10,
3060    #[doc = "Free Fall/Parachute (unpowered)."]
3061    MAV_ODID_UA_TYPE_FREE_FALL_PARACHUTE = 11,
3062    #[doc = "Rocket."]
3063    MAV_ODID_UA_TYPE_ROCKET = 12,
3064    #[doc = "Tethered powered aircraft."]
3065    MAV_ODID_UA_TYPE_TETHERED_POWERED_AIRCRAFT = 13,
3066    #[doc = "Ground Obstacle."]
3067    MAV_ODID_UA_TYPE_GROUND_OBSTACLE = 14,
3068    #[doc = "Other type of aircraft not listed earlier."]
3069    MAV_ODID_UA_TYPE_OTHER = 15,
3070}
3071impl MavOdidUaType {
3072    pub const DEFAULT: Self = Self::MAV_ODID_UA_TYPE_NONE;
3073}
3074impl Default for MavOdidUaType {
3075    fn default() -> Self {
3076        Self::DEFAULT
3077    }
3078}
3079#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3080#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3081#[cfg_attr(feature = "serde", serde(tag = "type"))]
3082#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3083#[repr(u32)]
3084pub enum MavOdidVerAcc {
3085    #[doc = "The vertical accuracy is unknown."]
3086    MAV_ODID_VER_ACC_UNKNOWN = 0,
3087    #[doc = "The vertical accuracy is smaller than 150 meter."]
3088    MAV_ODID_VER_ACC_150_METER = 1,
3089    #[doc = "The vertical accuracy is smaller than 45 meter."]
3090    MAV_ODID_VER_ACC_45_METER = 2,
3091    #[doc = "The vertical accuracy is smaller than 25 meter."]
3092    MAV_ODID_VER_ACC_25_METER = 3,
3093    #[doc = "The vertical accuracy is smaller than 10 meter."]
3094    MAV_ODID_VER_ACC_10_METER = 4,
3095    #[doc = "The vertical accuracy is smaller than 3 meter."]
3096    MAV_ODID_VER_ACC_3_METER = 5,
3097    #[doc = "The vertical accuracy is smaller than 1 meter."]
3098    MAV_ODID_VER_ACC_1_METER = 6,
3099}
3100impl MavOdidVerAcc {
3101    pub const DEFAULT: Self = Self::MAV_ODID_VER_ACC_UNKNOWN;
3102}
3103impl Default for MavOdidVerAcc {
3104    fn default() -> Self {
3105        Self::DEFAULT
3106    }
3107}
3108#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3109#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3110#[cfg_attr(feature = "serde", serde(tag = "type"))]
3111#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3112#[repr(u32)]
3113#[doc = "Specifies the datatype of a MAVLink extended parameter."]
3114pub enum MavParamExtType {
3115    #[doc = "8-bit unsigned integer"]
3116    MAV_PARAM_EXT_TYPE_UINT8 = 1,
3117    #[doc = "8-bit signed integer"]
3118    MAV_PARAM_EXT_TYPE_INT8 = 2,
3119    #[doc = "16-bit unsigned integer"]
3120    MAV_PARAM_EXT_TYPE_UINT16 = 3,
3121    #[doc = "16-bit signed integer"]
3122    MAV_PARAM_EXT_TYPE_INT16 = 4,
3123    #[doc = "32-bit unsigned integer"]
3124    MAV_PARAM_EXT_TYPE_UINT32 = 5,
3125    #[doc = "32-bit signed integer"]
3126    MAV_PARAM_EXT_TYPE_INT32 = 6,
3127    #[doc = "64-bit unsigned integer"]
3128    MAV_PARAM_EXT_TYPE_UINT64 = 7,
3129    #[doc = "64-bit signed integer"]
3130    MAV_PARAM_EXT_TYPE_INT64 = 8,
3131    #[doc = "32-bit floating-point"]
3132    MAV_PARAM_EXT_TYPE_REAL32 = 9,
3133    #[doc = "64-bit floating-point"]
3134    MAV_PARAM_EXT_TYPE_REAL64 = 10,
3135    #[doc = "Custom Type"]
3136    MAV_PARAM_EXT_TYPE_CUSTOM = 11,
3137}
3138impl MavParamExtType {
3139    pub const DEFAULT: Self = Self::MAV_PARAM_EXT_TYPE_UINT8;
3140}
3141impl Default for MavParamExtType {
3142    fn default() -> Self {
3143        Self::DEFAULT
3144    }
3145}
3146#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3147#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3148#[cfg_attr(feature = "serde", serde(tag = "type"))]
3149#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3150#[repr(u32)]
3151#[doc = "Specifies the datatype of a MAVLink parameter."]
3152pub enum MavParamType {
3153    #[doc = "8-bit unsigned integer"]
3154    MAV_PARAM_TYPE_UINT8 = 1,
3155    #[doc = "8-bit signed integer"]
3156    MAV_PARAM_TYPE_INT8 = 2,
3157    #[doc = "16-bit unsigned integer"]
3158    MAV_PARAM_TYPE_UINT16 = 3,
3159    #[doc = "16-bit signed integer"]
3160    MAV_PARAM_TYPE_INT16 = 4,
3161    #[doc = "32-bit unsigned integer"]
3162    MAV_PARAM_TYPE_UINT32 = 5,
3163    #[doc = "32-bit signed integer"]
3164    MAV_PARAM_TYPE_INT32 = 6,
3165    #[doc = "64-bit unsigned integer"]
3166    MAV_PARAM_TYPE_UINT64 = 7,
3167    #[doc = "64-bit signed integer"]
3168    MAV_PARAM_TYPE_INT64 = 8,
3169    #[doc = "32-bit floating-point"]
3170    MAV_PARAM_TYPE_REAL32 = 9,
3171    #[doc = "64-bit floating-point"]
3172    MAV_PARAM_TYPE_REAL64 = 10,
3173}
3174impl MavParamType {
3175    pub const DEFAULT: Self = Self::MAV_PARAM_TYPE_UINT8;
3176}
3177impl Default for MavParamType {
3178    fn default() -> Self {
3179        Self::DEFAULT
3180    }
3181}
3182bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Power supply status flags (bitmask)"] pub struct MavPowerStatus : u16 { # [doc = "main brick power supply valid"] const MAV_POWER_STATUS_BRICK_VALID = 1 ; # [doc = "main servo power supply valid for FMU"] const MAV_POWER_STATUS_SERVO_VALID = 2 ; # [doc = "USB power is connected"] const MAV_POWER_STATUS_USB_CONNECTED = 4 ; # [doc = "peripheral supply is in over-current state"] const MAV_POWER_STATUS_PERIPH_OVERCURRENT = 8 ; # [doc = "hi-power peripheral supply is in over-current state"] const MAV_POWER_STATUS_PERIPH_HIPOWER_OVERCURRENT = 16 ; # [doc = "Power status has changed since boot"] const MAV_POWER_STATUS_CHANGED = 32 ; } }
3183impl MavPowerStatus {
3184    pub const DEFAULT: Self = Self::MAV_POWER_STATUS_BRICK_VALID;
3185}
3186impl Default for MavPowerStatus {
3187    fn default() -> Self {
3188        Self::DEFAULT
3189    }
3190}
3191bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Bitmask of (optional) autopilot capabilities (64 bit). If a bit is set, the autopilot supports this capability."] pub struct MavProtocolCapability : u64 { # [doc = "Autopilot supports the MISSION_ITEM float message type.           Note that MISSION_ITEM is deprecated, and autopilots should use MISSION_INT instead."] const MAV_PROTOCOL_CAPABILITY_MISSION_FLOAT = 1 ; # [deprecated = " See `MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_C_CAST` (Deprecated since 2022-03)"] # [doc = "Autopilot supports the new param float message type."] const MAV_PROTOCOL_CAPABILITY_PARAM_FLOAT = 2 ; # [doc = "Autopilot supports MISSION_ITEM_INT scaled integer message type.           Note that this flag must always be set if missions are supported, because missions must always use MISSION_ITEM_INT (rather than MISSION_ITEM, which is deprecated)."] const MAV_PROTOCOL_CAPABILITY_MISSION_INT = 4 ; # [doc = "Autopilot supports COMMAND_INT scaled integer message type."] const MAV_PROTOCOL_CAPABILITY_COMMAND_INT = 8 ; # [doc = "Parameter protocol uses byte-wise encoding of parameter values into param_value (float) fields: <https://mavlink.io/en/services/parameter.html#parameter-encoding>.           Note that either this flag or MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_C_CAST should be set if the parameter protocol is supported."] const MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_BYTEWISE = 16 ; # [doc = "Autopilot supports the File Transfer Protocol v1: <https://mavlink.io/en/services/ftp.html>."] const MAV_PROTOCOL_CAPABILITY_FTP = 32 ; # [doc = "Autopilot supports commanding attitude offboard."] const MAV_PROTOCOL_CAPABILITY_SET_ATTITUDE_TARGET = 64 ; # [doc = "Autopilot supports commanding position and velocity targets in local NED frame."] const MAV_PROTOCOL_CAPABILITY_SET_POSITION_TARGET_LOCAL_NED = 128 ; # [doc = "Autopilot supports commanding position and velocity targets in global scaled integers."] const MAV_PROTOCOL_CAPABILITY_SET_POSITION_TARGET_GLOBAL_INT = 256 ; # [doc = "Autopilot supports terrain protocol / data handling."] const MAV_PROTOCOL_CAPABILITY_TERRAIN = 512 ; # [doc = "Reserved for future use."] const MAV_PROTOCOL_CAPABILITY_RESERVED3 = 1024 ; # [doc = "Autopilot supports the MAV_CMD_DO_FLIGHTTERMINATION command (flight termination)."] const MAV_PROTOCOL_CAPABILITY_FLIGHT_TERMINATION = 2048 ; # [doc = "Autopilot supports onboard compass calibration."] const MAV_PROTOCOL_CAPABILITY_COMPASS_CALIBRATION = 4096 ; # [doc = "Autopilot supports MAVLink version 2."] const MAV_PROTOCOL_CAPABILITY_MAVLINK2 = 8192 ; # [doc = "Autopilot supports mission fence protocol."] const MAV_PROTOCOL_CAPABILITY_MISSION_FENCE = 16384 ; # [doc = "Autopilot supports mission rally point protocol."] const MAV_PROTOCOL_CAPABILITY_MISSION_RALLY = 32768 ; # [doc = "Reserved for future use."] const MAV_PROTOCOL_CAPABILITY_RESERVED2 = 65536 ; # [doc = "Parameter protocol uses C-cast of parameter values to set the param_value (float) fields: <https://mavlink.io/en/services/parameter.html#parameter-encoding>.           Note that either this flag or MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_BYTEWISE should be set if the parameter protocol is supported."] const MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_C_CAST = 131072 ; # [doc = "This component implements/is a gimbal manager. This means the GIMBAL_MANAGER_INFORMATION, and other messages can be requested."] const MAV_PROTOCOL_CAPABILITY_COMPONENT_IMPLEMENTS_GIMBAL_MANAGER = 262144 ; # [doc = "Component supports locking control to a particular GCS independent of its system (via MAV_CMD_REQUEST_OPERATOR_CONTROL)."] const MAV_PROTOCOL_CAPABILITY_COMPONENT_ACCEPTS_GCS_CONTROL = 524288 ; } }
3192impl MavProtocolCapability {
3193    pub const DEFAULT: Self = Self::MAV_PROTOCOL_CAPABILITY_MISSION_FLOAT;
3194}
3195impl Default for MavProtocolCapability {
3196    fn default() -> Self {
3197        Self::DEFAULT
3198    }
3199}
3200#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3201#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3202#[cfg_attr(feature = "serde", serde(tag = "type"))]
3203#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3204#[repr(u32)]
3205#[doc = "Result from a MAVLink command (MAV_CMD)"]
3206pub enum MavResult {
3207    #[doc = "Command is valid (is supported and has valid parameters), and was executed."]
3208    MAV_RESULT_ACCEPTED = 0,
3209    #[doc = "Command is valid, but cannot be executed at this time. This is used to indicate a problem that should be fixed just by waiting (e.g. a state machine is busy, can't arm because have not got GPS lock, etc.). Retrying later should work."]
3210    MAV_RESULT_TEMPORARILY_REJECTED = 1,
3211    #[doc = "Command is invalid (is supported but has invalid parameters). Retrying same command and parameters will not work."]
3212    MAV_RESULT_DENIED = 2,
3213    #[doc = "Command is not supported (unknown)."]
3214    MAV_RESULT_UNSUPPORTED = 3,
3215    #[doc = "Command is valid, but execution has failed. This is used to indicate any non-temporary or unexpected problem, i.e. any problem that must be fixed before the command can succeed/be retried. For example, attempting to write a file when out of memory, attempting to arm when sensors are not calibrated, etc."]
3216    MAV_RESULT_FAILED = 4,
3217    #[doc = "Command is valid and is being executed. This will be followed by further progress updates, i.e. the component may send further COMMAND_ACK messages with result MAV_RESULT_IN_PROGRESS (at a rate decided by the implementation), and must terminate by sending a COMMAND_ACK message with final result of the operation. The COMMAND_ACK.progress field can be used to indicate the progress of the operation."]
3218    MAV_RESULT_IN_PROGRESS = 5,
3219    #[doc = "Command has been cancelled (as a result of receiving a COMMAND_CANCEL message)."]
3220    MAV_RESULT_CANCELLED = 6,
3221    #[doc = "Command is only accepted when sent as a COMMAND_LONG."]
3222    MAV_RESULT_COMMAND_LONG_ONLY = 7,
3223    #[doc = "Command is only accepted when sent as a COMMAND_INT."]
3224    MAV_RESULT_COMMAND_INT_ONLY = 8,
3225    #[doc = "Command is invalid because a frame is required and the specified frame is not supported."]
3226    MAV_RESULT_COMMAND_UNSUPPORTED_MAV_FRAME = 9,
3227}
3228impl MavResult {
3229    pub const DEFAULT: Self = Self::MAV_RESULT_ACCEPTED;
3230}
3231impl Default for MavResult {
3232    fn default() -> Self {
3233        Self::DEFAULT
3234    }
3235}
3236#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3237#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3238#[cfg_attr(feature = "serde", serde(tag = "type"))]
3239#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3240#[repr(u32)]
3241#[deprecated = " See `MAV_CMD_DO_SET_ROI_*` (Deprecated since 2018-01)"]
3242#[doc = "The ROI (region of interest) for the vehicle. This can be                 be used by the vehicle for camera/vehicle attitude alignment (see                 MAV_CMD_NAV_ROI)."]
3243pub enum MavRoi {
3244    #[doc = "No region of interest."]
3245    MAV_ROI_NONE = 0,
3246    #[doc = "Point toward next waypoint, with optional pitch/roll/yaw offset."]
3247    MAV_ROI_WPNEXT = 1,
3248    #[doc = "Point toward given waypoint."]
3249    MAV_ROI_WPINDEX = 2,
3250    #[doc = "Point toward fixed location."]
3251    MAV_ROI_LOCATION = 3,
3252    #[doc = "Point toward of given id."]
3253    MAV_ROI_TARGET = 4,
3254}
3255impl MavRoi {
3256    pub const DEFAULT: Self = Self::MAV_ROI_NONE;
3257}
3258impl Default for MavRoi {
3259    fn default() -> Self {
3260        Self::DEFAULT
3261    }
3262}
3263#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3264#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3265#[cfg_attr(feature = "serde", serde(tag = "type"))]
3266#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3267#[repr(u32)]
3268#[doc = "Enumeration of sensor orientation, according to its rotations"]
3269pub enum MavSensorOrientation {
3270    #[doc = "Roll: 0, Pitch: 0, Yaw: 0"]
3271    MAV_SENSOR_ROTATION_NONE = 0,
3272    #[doc = "Roll: 0, Pitch: 0, Yaw: 45"]
3273    MAV_SENSOR_ROTATION_YAW_45 = 1,
3274    #[doc = "Roll: 0, Pitch: 0, Yaw: 90"]
3275    MAV_SENSOR_ROTATION_YAW_90 = 2,
3276    #[doc = "Roll: 0, Pitch: 0, Yaw: 135"]
3277    MAV_SENSOR_ROTATION_YAW_135 = 3,
3278    #[doc = "Roll: 0, Pitch: 0, Yaw: 180"]
3279    MAV_SENSOR_ROTATION_YAW_180 = 4,
3280    #[doc = "Roll: 0, Pitch: 0, Yaw: 225"]
3281    MAV_SENSOR_ROTATION_YAW_225 = 5,
3282    #[doc = "Roll: 0, Pitch: 0, Yaw: 270"]
3283    MAV_SENSOR_ROTATION_YAW_270 = 6,
3284    #[doc = "Roll: 0, Pitch: 0, Yaw: 315"]
3285    MAV_SENSOR_ROTATION_YAW_315 = 7,
3286    #[doc = "Roll: 180, Pitch: 0, Yaw: 0"]
3287    MAV_SENSOR_ROTATION_ROLL_180 = 8,
3288    #[doc = "Roll: 180, Pitch: 0, Yaw: 45"]
3289    MAV_SENSOR_ROTATION_ROLL_180_YAW_45 = 9,
3290    #[doc = "Roll: 180, Pitch: 0, Yaw: 90"]
3291    MAV_SENSOR_ROTATION_ROLL_180_YAW_90 = 10,
3292    #[doc = "Roll: 180, Pitch: 0, Yaw: 135"]
3293    MAV_SENSOR_ROTATION_ROLL_180_YAW_135 = 11,
3294    #[doc = "Roll: 0, Pitch: 180, Yaw: 0"]
3295    MAV_SENSOR_ROTATION_PITCH_180 = 12,
3296    #[doc = "Roll: 180, Pitch: 0, Yaw: 225"]
3297    MAV_SENSOR_ROTATION_ROLL_180_YAW_225 = 13,
3298    #[doc = "Roll: 180, Pitch: 0, Yaw: 270"]
3299    MAV_SENSOR_ROTATION_ROLL_180_YAW_270 = 14,
3300    #[doc = "Roll: 180, Pitch: 0, Yaw: 315"]
3301    MAV_SENSOR_ROTATION_ROLL_180_YAW_315 = 15,
3302    #[doc = "Roll: 90, Pitch: 0, Yaw: 0"]
3303    MAV_SENSOR_ROTATION_ROLL_90 = 16,
3304    #[doc = "Roll: 90, Pitch: 0, Yaw: 45"]
3305    MAV_SENSOR_ROTATION_ROLL_90_YAW_45 = 17,
3306    #[doc = "Roll: 90, Pitch: 0, Yaw: 90"]
3307    MAV_SENSOR_ROTATION_ROLL_90_YAW_90 = 18,
3308    #[doc = "Roll: 90, Pitch: 0, Yaw: 135"]
3309    MAV_SENSOR_ROTATION_ROLL_90_YAW_135 = 19,
3310    #[doc = "Roll: 270, Pitch: 0, Yaw: 0"]
3311    MAV_SENSOR_ROTATION_ROLL_270 = 20,
3312    #[doc = "Roll: 270, Pitch: 0, Yaw: 45"]
3313    MAV_SENSOR_ROTATION_ROLL_270_YAW_45 = 21,
3314    #[doc = "Roll: 270, Pitch: 0, Yaw: 90"]
3315    MAV_SENSOR_ROTATION_ROLL_270_YAW_90 = 22,
3316    #[doc = "Roll: 270, Pitch: 0, Yaw: 135"]
3317    MAV_SENSOR_ROTATION_ROLL_270_YAW_135 = 23,
3318    #[doc = "Roll: 0, Pitch: 90, Yaw: 0"]
3319    MAV_SENSOR_ROTATION_PITCH_90 = 24,
3320    #[doc = "Roll: 0, Pitch: 270, Yaw: 0"]
3321    MAV_SENSOR_ROTATION_PITCH_270 = 25,
3322    #[doc = "Roll: 0, Pitch: 180, Yaw: 90"]
3323    MAV_SENSOR_ROTATION_PITCH_180_YAW_90 = 26,
3324    #[doc = "Roll: 0, Pitch: 180, Yaw: 270"]
3325    MAV_SENSOR_ROTATION_PITCH_180_YAW_270 = 27,
3326    #[doc = "Roll: 90, Pitch: 90, Yaw: 0"]
3327    MAV_SENSOR_ROTATION_ROLL_90_PITCH_90 = 28,
3328    #[doc = "Roll: 180, Pitch: 90, Yaw: 0"]
3329    MAV_SENSOR_ROTATION_ROLL_180_PITCH_90 = 29,
3330    #[doc = "Roll: 270, Pitch: 90, Yaw: 0"]
3331    MAV_SENSOR_ROTATION_ROLL_270_PITCH_90 = 30,
3332    #[doc = "Roll: 90, Pitch: 180, Yaw: 0"]
3333    MAV_SENSOR_ROTATION_ROLL_90_PITCH_180 = 31,
3334    #[doc = "Roll: 270, Pitch: 180, Yaw: 0"]
3335    MAV_SENSOR_ROTATION_ROLL_270_PITCH_180 = 32,
3336    #[doc = "Roll: 90, Pitch: 270, Yaw: 0"]
3337    MAV_SENSOR_ROTATION_ROLL_90_PITCH_270 = 33,
3338    #[doc = "Roll: 180, Pitch: 270, Yaw: 0"]
3339    MAV_SENSOR_ROTATION_ROLL_180_PITCH_270 = 34,
3340    #[doc = "Roll: 270, Pitch: 270, Yaw: 0"]
3341    MAV_SENSOR_ROTATION_ROLL_270_PITCH_270 = 35,
3342    #[doc = "Roll: 90, Pitch: 180, Yaw: 90"]
3343    MAV_SENSOR_ROTATION_ROLL_90_PITCH_180_YAW_90 = 36,
3344    #[doc = "Roll: 90, Pitch: 0, Yaw: 270"]
3345    MAV_SENSOR_ROTATION_ROLL_90_YAW_270 = 37,
3346    #[doc = "Roll: 90, Pitch: 68, Yaw: 293"]
3347    MAV_SENSOR_ROTATION_ROLL_90_PITCH_68_YAW_293 = 38,
3348    #[doc = "Pitch: 315"]
3349    MAV_SENSOR_ROTATION_PITCH_315 = 39,
3350    #[doc = "Roll: 90, Pitch: 315"]
3351    MAV_SENSOR_ROTATION_ROLL_90_PITCH_315 = 40,
3352    #[doc = "Custom orientation"]
3353    MAV_SENSOR_ROTATION_CUSTOM = 100,
3354}
3355impl MavSensorOrientation {
3356    pub const DEFAULT: Self = Self::MAV_SENSOR_ROTATION_NONE;
3357}
3358impl Default for MavSensorOrientation {
3359    fn default() -> Self {
3360        Self::DEFAULT
3361    }
3362}
3363#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3364#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3365#[cfg_attr(feature = "serde", serde(tag = "type"))]
3366#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3367#[repr(u32)]
3368#[doc = "Indicates the severity level, generally used for status messages to indicate their relative urgency. Based on RFC-5424 using expanded definitions at: <http://www.kiwisyslog.com/kb/info:-syslog-message-levels/>."]
3369pub enum MavSeverity {
3370    #[doc = "System is unusable. This is a \"panic\" condition."]
3371    MAV_SEVERITY_EMERGENCY = 0,
3372    #[doc = "Action should be taken immediately. Indicates error in non-critical systems."]
3373    MAV_SEVERITY_ALERT = 1,
3374    #[doc = "Action must be taken immediately. Indicates failure in a primary system."]
3375    MAV_SEVERITY_CRITICAL = 2,
3376    #[doc = "Indicates an error in secondary/redundant systems."]
3377    MAV_SEVERITY_ERROR = 3,
3378    #[doc = "Indicates about a possible future error if this is not resolved within a given timeframe. Example would be a low battery warning."]
3379    MAV_SEVERITY_WARNING = 4,
3380    #[doc = "An unusual event has occurred, though not an error condition. This should be investigated for the root cause."]
3381    MAV_SEVERITY_NOTICE = 5,
3382    #[doc = "Normal operational messages. Useful for logging. No action is required for these messages."]
3383    MAV_SEVERITY_INFO = 6,
3384    #[doc = "Useful non-operational messages that can assist in debugging. These should not occur during normal operation."]
3385    MAV_SEVERITY_DEBUG = 7,
3386}
3387impl MavSeverity {
3388    pub const DEFAULT: Self = Self::MAV_SEVERITY_EMERGENCY;
3389}
3390impl Default for MavSeverity {
3391    fn default() -> Self {
3392        Self::DEFAULT
3393    }
3394}
3395#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3396#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3397#[cfg_attr(feature = "serde", serde(tag = "type"))]
3398#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3399#[repr(u32)]
3400#[doc = "Standard modes with a well understood meaning across flight stacks and vehicle types.         For example, most flight stack have the concept of a \"return\" or \"RTL\" mode that takes a vehicle to safety, even though the precise mechanics of this mode may differ.         The modes supported by a flight stack can be queried using AVAILABLE_MODES and set using MAV_CMD_DO_SET_STANDARD_MODE.         The current mode is streamed in CURRENT_MODE.         See <https://mavlink.io/en/services/standard_modes.html>"]
3401pub enum MavStandardMode {
3402    #[doc = "Non standard mode.           This may be used when reporting the mode if the current flight mode is not a standard mode."]
3403    MAV_STANDARD_MODE_NON_STANDARD = 0,
3404    #[doc = "Position mode (manual).           Position-controlled and stabilized manual mode.           When sticks are released vehicles return to their level-flight orientation and hold both position and altitude against wind and external forces.           This mode can only be set by vehicles that can hold a fixed position.           Multicopter (MC) vehicles actively brake and hold both position and altitude against wind and external forces.           Hybrid MC/FW (\"VTOL\") vehicles first transition to multicopter mode (if needed) but otherwise behave in the same way as MC vehicles.           Fixed-wing (FW) vehicles must not support this mode.           Other vehicle types must not support this mode (this may be revisited through the PR process)."]
3405    MAV_STANDARD_MODE_POSITION_HOLD = 1,
3406    #[doc = "Orbit (manual).           Position-controlled and stabilized manual mode.           The vehicle circles around a fixed setpoint in the horizontal plane at a particular radius, altitude, and direction.           Flight stacks may further allow manual control over the setpoint position, radius, direction, speed, and/or altitude of the circle, but this is not mandated.           Flight stacks may support the [MAV_CMD_DO_ORBIT](<https://mavlink.io/en/messages/common.html#MAV_CMD_DO_ORBIT>) for changing the orbit parameters.           MC and FW vehicles may support this mode.           Hybrid MC/FW (\"VTOL\") vehicles may support this mode in MC/FW or both modes; if the mode is not supported by the current configuration the vehicle should transition to the supported configuration.           Other vehicle types must not support this mode (this may be revisited through the PR process)."]
3407    MAV_STANDARD_MODE_ORBIT = 2,
3408    #[doc = "Cruise mode (manual).           Position-controlled and stabilized manual mode.           When sticks are released vehicles return to their level-flight orientation and hold their original track against wind and external forces.           Fixed-wing (FW) vehicles level orientation and maintain current track and altitude against wind and external forces.           Hybrid MC/FW (\"VTOL\") vehicles first transition to FW mode (if needed) but otherwise behave in the same way as MC vehicles.           Multicopter (MC) vehicles must not support this mode.           Other vehicle types must not support this mode (this may be revisited through the PR process)."]
3409    MAV_STANDARD_MODE_CRUISE = 3,
3410    #[doc = "Altitude hold (manual).           Altitude-controlled and stabilized manual mode.           When sticks are released vehicles return to their level-flight orientation and hold their altitude.           MC vehicles continue with existing momentum and may move with wind (or other external forces).           FW vehicles continue with current heading, but may be moved off-track by wind.           Hybrid MC/FW (\"VTOL\") vehicles behave according to their current configuration/mode (FW or MC).           Other vehicle types must not support this mode (this may be revisited through the PR process)."]
3411    MAV_STANDARD_MODE_ALTITUDE_HOLD = 4,
3412    #[doc = "Safe recovery mode (auto).           Automatic mode that takes vehicle to a predefined safe location via a safe flight path, and may also automatically land the vehicle.           This mode is more commonly referred to as RTL and/or or Smart RTL.           The precise return location, flight path, and landing behaviour depend on vehicle configuration and type.           For example, the vehicle might return to the home/launch location, a rally point, or the start of a mission landing, it might follow a direct path, mission path, or breadcrumb path, and land using a mission landing pattern or some other kind of descent."]
3413    MAV_STANDARD_MODE_SAFE_RECOVERY = 5,
3414    #[doc = "Mission mode (automatic).           Automatic mode that executes MAVLink missions.           Missions are executed from the current waypoint as soon as the mode is enabled."]
3415    MAV_STANDARD_MODE_MISSION = 6,
3416    #[doc = "Land mode (auto).           Automatic mode that lands the vehicle at the current location.           The precise landing behaviour depends on vehicle configuration and type."]
3417    MAV_STANDARD_MODE_LAND = 7,
3418    #[doc = "Takeoff mode (auto).           Automatic takeoff mode.           The precise takeoff behaviour depends on vehicle configuration and type."]
3419    MAV_STANDARD_MODE_TAKEOFF = 8,
3420}
3421impl MavStandardMode {
3422    pub const DEFAULT: Self = Self::MAV_STANDARD_MODE_NON_STANDARD;
3423}
3424impl Default for MavStandardMode {
3425    fn default() -> Self {
3426        Self::DEFAULT
3427    }
3428}
3429#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3430#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3431#[cfg_attr(feature = "serde", serde(tag = "type"))]
3432#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3433#[repr(u32)]
3434pub enum MavState {
3435    #[doc = "Uninitialized system, state is unknown."]
3436    MAV_STATE_UNINIT = 0,
3437    #[doc = "System is booting up."]
3438    MAV_STATE_BOOT = 1,
3439    #[doc = "System is calibrating and not flight-ready."]
3440    MAV_STATE_CALIBRATING = 2,
3441    #[doc = "System is grounded and on standby. It can be launched any time."]
3442    MAV_STATE_STANDBY = 3,
3443    #[doc = "System is active and might be already airborne. Motors are engaged."]
3444    MAV_STATE_ACTIVE = 4,
3445    #[doc = "System is in a non-normal flight mode (failsafe). It can however still navigate."]
3446    MAV_STATE_CRITICAL = 5,
3447    #[doc = "System is in a non-normal flight mode (failsafe). It lost control over parts or over the whole airframe. It is in mayday and going down."]
3448    MAV_STATE_EMERGENCY = 6,
3449    #[doc = "System just initialized its power-down sequence, will shut down now."]
3450    MAV_STATE_POWEROFF = 7,
3451    #[doc = "System is terminating itself (failsafe or commanded)."]
3452    MAV_STATE_FLIGHT_TERMINATION = 8,
3453}
3454impl MavState {
3455    pub const DEFAULT: Self = Self::MAV_STATE_UNINIT;
3456}
3457impl Default for MavState {
3458    fn default() -> Self {
3459        Self::DEFAULT
3460    }
3461}
3462bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These encode the sensors whose status is sent as part of the SYS_STATUS message."] pub struct MavSysStatusSensor : u32 { # [doc = "0x01 3D gyro"] const MAV_SYS_STATUS_SENSOR_3D_GYRO = 1 ; # [doc = "0x02 3D accelerometer"] const MAV_SYS_STATUS_SENSOR_3D_ACCEL = 2 ; # [doc = "0x04 3D magnetometer"] const MAV_SYS_STATUS_SENSOR_3D_MAG = 4 ; # [doc = "0x08 absolute pressure"] const MAV_SYS_STATUS_SENSOR_ABSOLUTE_PRESSURE = 8 ; # [doc = "0x10 differential pressure"] const MAV_SYS_STATUS_SENSOR_DIFFERENTIAL_PRESSURE = 16 ; # [doc = "0x20 GPS"] const MAV_SYS_STATUS_SENSOR_GPS = 32 ; # [doc = "0x40 optical flow"] const MAV_SYS_STATUS_SENSOR_OPTICAL_FLOW = 64 ; # [doc = "0x80 computer vision position"] const MAV_SYS_STATUS_SENSOR_VISION_POSITION = 128 ; # [doc = "0x100 laser based position"] const MAV_SYS_STATUS_SENSOR_LASER_POSITION = 256 ; # [doc = "0x200 external ground truth (Vicon or Leica)"] const MAV_SYS_STATUS_SENSOR_EXTERNAL_GROUND_TRUTH = 512 ; # [doc = "0x400 3D angular rate control"] const MAV_SYS_STATUS_SENSOR_ANGULAR_RATE_CONTROL = 1024 ; # [doc = "0x800 attitude stabilization"] const MAV_SYS_STATUS_SENSOR_ATTITUDE_STABILIZATION = 2048 ; # [doc = "0x1000 yaw position"] const MAV_SYS_STATUS_SENSOR_YAW_POSITION = 4096 ; # [doc = "0x2000 z/altitude control"] const MAV_SYS_STATUS_SENSOR_Z_ALTITUDE_CONTROL = 8192 ; # [doc = "0x4000 x/y position control"] const MAV_SYS_STATUS_SENSOR_XY_POSITION_CONTROL = 16384 ; # [doc = "0x8000 motor outputs / control"] const MAV_SYS_STATUS_SENSOR_MOTOR_OUTPUTS = 32768 ; # [doc = "0x10000 RC receiver"] const MAV_SYS_STATUS_SENSOR_RC_RECEIVER = 65536 ; # [doc = "0x20000 2nd 3D gyro"] const MAV_SYS_STATUS_SENSOR_3D_GYRO2 = 131072 ; # [doc = "0x40000 2nd 3D accelerometer"] const MAV_SYS_STATUS_SENSOR_3D_ACCEL2 = 262144 ; # [doc = "0x80000 2nd 3D magnetometer"] const MAV_SYS_STATUS_SENSOR_3D_MAG2 = 524288 ; # [doc = "0x100000 geofence"] const MAV_SYS_STATUS_GEOFENCE = 1048576 ; # [doc = "0x200000 AHRS subsystem health"] const MAV_SYS_STATUS_AHRS = 2097152 ; # [doc = "0x400000 Terrain subsystem health"] const MAV_SYS_STATUS_TERRAIN = 4194304 ; # [doc = "0x800000 Motors are reversed"] const MAV_SYS_STATUS_REVERSE_MOTOR = 8388608 ; # [doc = "0x1000000 Logging"] const MAV_SYS_STATUS_LOGGING = 16777216 ; # [doc = "0x2000000 Battery"] const MAV_SYS_STATUS_SENSOR_BATTERY = 33554432 ; # [doc = "0x4000000 Proximity"] const MAV_SYS_STATUS_SENSOR_PROXIMITY = 67108864 ; # [doc = "0x8000000 Satellite Communication"] const MAV_SYS_STATUS_SENSOR_SATCOM = 134217728 ; # [doc = "0x10000000 pre-arm check status. Always healthy when armed"] const MAV_SYS_STATUS_PREARM_CHECK = 268435456 ; # [doc = "0x20000000 Avoidance/collision prevention"] const MAV_SYS_STATUS_OBSTACLE_AVOIDANCE = 536870912 ; # [doc = "0x40000000 propulsion (actuator, esc, motor or propellor)"] const MAV_SYS_STATUS_SENSOR_PROPULSION = 1073741824 ; # [doc = "0x80000000 Extended bit-field are used for further sensor status bits (needs to be set in onboard_control_sensors_present only)"] const MAV_SYS_STATUS_EXTENSION_USED = 2147483648 ; } }
3463impl MavSysStatusSensor {
3464    pub const DEFAULT: Self = Self::MAV_SYS_STATUS_SENSOR_3D_GYRO;
3465}
3466impl Default for MavSysStatusSensor {
3467    fn default() -> Self {
3468        Self::DEFAULT
3469    }
3470}
3471bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These encode the sensors whose status is sent as part of the SYS_STATUS message in the extended fields."] pub struct MavSysStatusSensorExtended : u32 { # [doc = "0x01 Recovery system (parachute, balloon, retracts etc)"] const MAV_SYS_STATUS_RECOVERY_SYSTEM = 1 ; } }
3472impl MavSysStatusSensorExtended {
3473    pub const DEFAULT: Self = Self::MAV_SYS_STATUS_RECOVERY_SYSTEM;
3474}
3475impl Default for MavSysStatusSensorExtended {
3476    fn default() -> Self {
3477        Self::DEFAULT
3478    }
3479}
3480#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3481#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3482#[cfg_attr(feature = "serde", serde(tag = "type"))]
3483#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3484#[repr(u32)]
3485pub enum MavTunnelPayloadType {
3486    #[doc = "Encoding of payload unknown."]
3487    MAV_TUNNEL_PAYLOAD_TYPE_UNKNOWN = 0,
3488    #[doc = "Registered for STorM32 gimbal controller."]
3489    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED0 = 200,
3490    #[doc = "Registered for STorM32 gimbal controller."]
3491    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED1 = 201,
3492    #[doc = "Registered for STorM32 gimbal controller."]
3493    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED2 = 202,
3494    #[doc = "Registered for STorM32 gimbal controller."]
3495    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED3 = 203,
3496    #[doc = "Registered for STorM32 gimbal controller."]
3497    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED4 = 204,
3498    #[doc = "Registered for STorM32 gimbal controller."]
3499    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED5 = 205,
3500    #[doc = "Registered for STorM32 gimbal controller."]
3501    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED6 = 206,
3502    #[doc = "Registered for STorM32 gimbal controller."]
3503    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED7 = 207,
3504    #[doc = "Registered for STorM32 gimbal controller."]
3505    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED8 = 208,
3506    #[doc = "Registered for STorM32 gimbal controller."]
3507    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED9 = 209,
3508    #[doc = "Registered for ModalAI remote OSD protocol."]
3509    MAV_TUNNEL_PAYLOAD_TYPE_MODALAI_REMOTE_OSD = 210,
3510    #[doc = "Registered for ModalAI ESC UART passthru protocol."]
3511    MAV_TUNNEL_PAYLOAD_TYPE_MODALAI_ESC_UART_PASSTHRU = 211,
3512    #[doc = "Registered for ModalAI vendor use."]
3513    MAV_TUNNEL_PAYLOAD_TYPE_MODALAI_IO_UART_PASSTHRU = 212,
3514}
3515impl MavTunnelPayloadType {
3516    pub const DEFAULT: Self = Self::MAV_TUNNEL_PAYLOAD_TYPE_UNKNOWN;
3517}
3518impl Default for MavTunnelPayloadType {
3519    fn default() -> Self {
3520        Self::DEFAULT
3521    }
3522}
3523#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3524#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3525#[cfg_attr(feature = "serde", serde(tag = "type"))]
3526#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3527#[repr(u32)]
3528#[doc = "MAVLINK component type reported in HEARTBEAT message. Flight controllers must report the type of the vehicle on which they are mounted (e.g. MAV_TYPE_OCTOROTOR). All other components must report a value appropriate for their type (e.g. a camera must use MAV_TYPE_CAMERA)."]
3529pub enum MavType {
3530    #[doc = "Generic micro air vehicle"]
3531    MAV_TYPE_GENERIC = 0,
3532    #[doc = "Fixed wing aircraft."]
3533    MAV_TYPE_FIXED_WING = 1,
3534    #[doc = "Quadrotor"]
3535    MAV_TYPE_QUADROTOR = 2,
3536    #[doc = "Coaxial helicopter"]
3537    MAV_TYPE_COAXIAL = 3,
3538    #[doc = "Normal helicopter with tail rotor."]
3539    MAV_TYPE_HELICOPTER = 4,
3540    #[doc = "Ground installation"]
3541    MAV_TYPE_ANTENNA_TRACKER = 5,
3542    #[doc = "Operator control unit / ground control station"]
3543    MAV_TYPE_GCS = 6,
3544    #[doc = "Airship, controlled"]
3545    MAV_TYPE_AIRSHIP = 7,
3546    #[doc = "Free balloon, uncontrolled"]
3547    MAV_TYPE_FREE_BALLOON = 8,
3548    #[doc = "Rocket"]
3549    MAV_TYPE_ROCKET = 9,
3550    #[doc = "Ground rover"]
3551    MAV_TYPE_GROUND_ROVER = 10,
3552    #[doc = "Surface vessel, boat, ship"]
3553    MAV_TYPE_SURFACE_BOAT = 11,
3554    #[doc = "Submarine"]
3555    MAV_TYPE_SUBMARINE = 12,
3556    #[doc = "Hexarotor"]
3557    MAV_TYPE_HEXAROTOR = 13,
3558    #[doc = "Octorotor"]
3559    MAV_TYPE_OCTOROTOR = 14,
3560    #[doc = "Tricopter"]
3561    MAV_TYPE_TRICOPTER = 15,
3562    #[doc = "Flapping wing"]
3563    MAV_TYPE_FLAPPING_WING = 16,
3564    #[doc = "Kite"]
3565    MAV_TYPE_KITE = 17,
3566    #[doc = "Onboard companion controller"]
3567    MAV_TYPE_ONBOARD_CONTROLLER = 18,
3568    #[doc = "Two-rotor Tailsitter VTOL that additionally uses control surfaces in vertical operation. Note, value previously named MAV_TYPE_VTOL_DUOROTOR."]
3569    MAV_TYPE_VTOL_TAILSITTER_DUOROTOR = 19,
3570    #[doc = "Quad-rotor Tailsitter VTOL using a V-shaped quad config in vertical operation. Note: value previously named MAV_TYPE_VTOL_QUADROTOR."]
3571    MAV_TYPE_VTOL_TAILSITTER_QUADROTOR = 20,
3572    #[doc = "Tiltrotor VTOL. Fuselage and wings stay (nominally) horizontal in all flight phases. It able to tilt (some) rotors to provide thrust in cruise flight."]
3573    MAV_TYPE_VTOL_TILTROTOR = 21,
3574    #[doc = "VTOL with separate fixed rotors for hover and cruise flight. Fuselage and wings stay (nominally) horizontal in all flight phases."]
3575    MAV_TYPE_VTOL_FIXEDROTOR = 22,
3576    #[doc = "Tailsitter VTOL. Fuselage and wings orientation changes depending on flight phase: vertical for hover, horizontal for cruise. Use more specific VTOL MAV_TYPE_VTOL_TAILSITTER_DUOROTOR or MAV_TYPE_VTOL_TAILSITTER_QUADROTOR if appropriate."]
3577    MAV_TYPE_VTOL_TAILSITTER = 23,
3578    #[doc = "Tiltwing VTOL. Fuselage stays horizontal in all flight phases. The whole wing, along with any attached engine, can tilt between vertical and horizontal mode."]
3579    MAV_TYPE_VTOL_TILTWING = 24,
3580    #[doc = "VTOL reserved 5"]
3581    MAV_TYPE_VTOL_RESERVED5 = 25,
3582    #[doc = "Gimbal"]
3583    MAV_TYPE_GIMBAL = 26,
3584    #[doc = "ADSB system"]
3585    MAV_TYPE_ADSB = 27,
3586    #[doc = "Steerable, nonrigid airfoil"]
3587    MAV_TYPE_PARAFOIL = 28,
3588    #[doc = "Dodecarotor"]
3589    MAV_TYPE_DODECAROTOR = 29,
3590    #[doc = "Camera"]
3591    MAV_TYPE_CAMERA = 30,
3592    #[doc = "Charging station"]
3593    MAV_TYPE_CHARGING_STATION = 31,
3594    #[doc = "FLARM collision avoidance system"]
3595    MAV_TYPE_FLARM = 32,
3596    #[doc = "Servo"]
3597    MAV_TYPE_SERVO = 33,
3598    #[doc = "Open Drone ID. See <https://mavlink.io/en/services/opendroneid.html>."]
3599    MAV_TYPE_ODID = 34,
3600    #[doc = "Decarotor"]
3601    MAV_TYPE_DECAROTOR = 35,
3602    #[doc = "Battery"]
3603    MAV_TYPE_BATTERY = 36,
3604    #[doc = "Parachute"]
3605    MAV_TYPE_PARACHUTE = 37,
3606    #[doc = "Log"]
3607    MAV_TYPE_LOG = 38,
3608    #[doc = "OSD"]
3609    MAV_TYPE_OSD = 39,
3610    #[doc = "IMU"]
3611    MAV_TYPE_IMU = 40,
3612    #[doc = "GPS"]
3613    MAV_TYPE_GPS = 41,
3614    #[doc = "Winch"]
3615    MAV_TYPE_WINCH = 42,
3616    #[doc = "Generic multirotor that does not fit into a specific type or whose type is unknown"]
3617    MAV_TYPE_GENERIC_MULTIROTOR = 43,
3618    #[doc = "Illuminator. An illuminator is a light source that is used for lighting up dark areas external to the sytstem: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light)."]
3619    MAV_TYPE_ILLUMINATOR = 44,
3620    #[doc = "Orbiter spacecraft. Includes satellites orbiting terrestrial and extra-terrestrial bodies. Follows NASA Spacecraft Classification."]
3621    MAV_TYPE_SPACECRAFT_ORBITER = 45,
3622}
3623impl MavType {
3624    pub const DEFAULT: Self = Self::MAV_TYPE_GENERIC;
3625}
3626impl Default for MavType {
3627    fn default() -> Self {
3628        Self::DEFAULT
3629    }
3630}
3631#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3632#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3633#[cfg_attr(feature = "serde", serde(tag = "type"))]
3634#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3635#[repr(u32)]
3636#[doc = "Enumeration of VTOL states"]
3637pub enum MavVtolState {
3638    #[doc = "MAV is not configured as VTOL"]
3639    MAV_VTOL_STATE_UNDEFINED = 0,
3640    #[doc = "VTOL is in transition from multicopter to fixed-wing"]
3641    MAV_VTOL_STATE_TRANSITION_TO_FW = 1,
3642    #[doc = "VTOL is in transition from fixed-wing to multicopter"]
3643    MAV_VTOL_STATE_TRANSITION_TO_MC = 2,
3644    #[doc = "VTOL is in multicopter state"]
3645    MAV_VTOL_STATE_MC = 3,
3646    #[doc = "VTOL is in fixed-wing state"]
3647    MAV_VTOL_STATE_FW = 4,
3648}
3649impl MavVtolState {
3650    pub const DEFAULT: Self = Self::MAV_VTOL_STATE_UNDEFINED;
3651}
3652impl Default for MavVtolState {
3653    fn default() -> Self {
3654        Self::DEFAULT
3655    }
3656}
3657bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Winch status flags used in WINCH_STATUS"] pub struct MavWinchStatusFlag : u32 { # [doc = "Winch is healthy"] const MAV_WINCH_STATUS_HEALTHY = 1 ; # [doc = "Winch line is fully retracted"] const MAV_WINCH_STATUS_FULLY_RETRACTED = 2 ; # [doc = "Winch motor is moving"] const MAV_WINCH_STATUS_MOVING = 4 ; # [doc = "Winch clutch is engaged allowing motor to move freely."] const MAV_WINCH_STATUS_CLUTCH_ENGAGED = 8 ; # [doc = "Winch is locked by locking mechanism."] const MAV_WINCH_STATUS_LOCKED = 16 ; # [doc = "Winch is gravity dropping payload."] const MAV_WINCH_STATUS_DROPPING = 32 ; # [doc = "Winch is arresting payload descent."] const MAV_WINCH_STATUS_ARRESTING = 64 ; # [doc = "Winch is using torque measurements to sense the ground."] const MAV_WINCH_STATUS_GROUND_SENSE = 128 ; # [doc = "Winch is returning to the fully retracted position."] const MAV_WINCH_STATUS_RETRACTING = 256 ; # [doc = "Winch is redelivering the payload. This is a failover state if the line tension goes above a threshold during RETRACTING."] const MAV_WINCH_STATUS_REDELIVER = 512 ; # [doc = "Winch is abandoning the line and possibly payload. Winch unspools the entire calculated line length. This is a failover state from REDELIVER if the number of attempts exceeds a threshold."] const MAV_WINCH_STATUS_ABANDON_LINE = 1024 ; # [doc = "Winch is engaging the locking mechanism."] const MAV_WINCH_STATUS_LOCKING = 2048 ; # [doc = "Winch is spooling on line."] const MAV_WINCH_STATUS_LOAD_LINE = 4096 ; # [doc = "Winch is loading a payload."] const MAV_WINCH_STATUS_LOAD_PAYLOAD = 8192 ; } }
3658impl MavWinchStatusFlag {
3659    pub const DEFAULT: Self = Self::MAV_WINCH_STATUS_HEALTHY;
3660}
3661impl Default for MavWinchStatusFlag {
3662    fn default() -> Self {
3663        Self::DEFAULT
3664    }
3665}
3666#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3667#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3668#[cfg_attr(feature = "serde", serde(tag = "type"))]
3669#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3670#[repr(u32)]
3671pub enum MavlinkDataStreamType {
3672    MAVLINK_DATA_STREAM_IMG_JPEG = 0,
3673    MAVLINK_DATA_STREAM_IMG_BMP = 1,
3674    MAVLINK_DATA_STREAM_IMG_RAW8U = 2,
3675    MAVLINK_DATA_STREAM_IMG_RAW32U = 3,
3676    MAVLINK_DATA_STREAM_IMG_PGM = 4,
3677    MAVLINK_DATA_STREAM_IMG_PNG = 5,
3678}
3679impl MavlinkDataStreamType {
3680    pub const DEFAULT: Self = Self::MAVLINK_DATA_STREAM_IMG_JPEG;
3681}
3682impl Default for MavlinkDataStreamType {
3683    fn default() -> Self {
3684        Self::DEFAULT
3685    }
3686}
3687#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3688#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3689#[cfg_attr(feature = "serde", serde(tag = "type"))]
3690#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3691#[repr(u32)]
3692#[doc = "States of the mission state machine.         Note that these states are independent of whether the mission is in a mode that can execute mission items or not (is suspended).         They may not all be relevant on all vehicles."]
3693pub enum MissionState {
3694    #[doc = "The mission status reporting is not supported."]
3695    MISSION_STATE_UNKNOWN = 0,
3696    #[doc = "No mission on the vehicle."]
3697    MISSION_STATE_NO_MISSION = 1,
3698    #[doc = "Mission has not started. This is the case after a mission has uploaded but not yet started executing."]
3699    MISSION_STATE_NOT_STARTED = 2,
3700    #[doc = "Mission is active, and will execute mission items when in auto mode."]
3701    MISSION_STATE_ACTIVE = 3,
3702    #[doc = "Mission is paused when in auto mode."]
3703    MISSION_STATE_PAUSED = 4,
3704    #[doc = "Mission has executed all mission items."]
3705    MISSION_STATE_COMPLETE = 5,
3706}
3707impl MissionState {
3708    pub const DEFAULT: Self = Self::MISSION_STATE_UNKNOWN;
3709}
3710impl Default for MissionState {
3711    fn default() -> Self {
3712        Self::DEFAULT
3713    }
3714}
3715#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3716#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3717#[cfg_attr(feature = "serde", serde(tag = "type"))]
3718#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3719#[repr(u32)]
3720#[doc = "Sequence that motors are tested when using MAV_CMD_DO_MOTOR_TEST."]
3721pub enum MotorTestOrder {
3722    #[doc = "Default autopilot motor test method."]
3723    MOTOR_TEST_ORDER_DEFAULT = 0,
3724    #[doc = "Motor numbers are specified as their index in a predefined vehicle-specific sequence."]
3725    MOTOR_TEST_ORDER_SEQUENCE = 1,
3726    #[doc = "Motor numbers are specified as the output as labeled on the board."]
3727    MOTOR_TEST_ORDER_BOARD = 2,
3728}
3729impl MotorTestOrder {
3730    pub const DEFAULT: Self = Self::MOTOR_TEST_ORDER_DEFAULT;
3731}
3732impl Default for MotorTestOrder {
3733    fn default() -> Self {
3734        Self::DEFAULT
3735    }
3736}
3737#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3738#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3739#[cfg_attr(feature = "serde", serde(tag = "type"))]
3740#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3741#[repr(u32)]
3742#[doc = "Defines how throttle value is represented in MAV_CMD_DO_MOTOR_TEST."]
3743pub enum MotorTestThrottleType {
3744    #[doc = "Throttle as a percentage (0 ~ 100)"]
3745    MOTOR_TEST_THROTTLE_PERCENT = 0,
3746    #[doc = "Throttle as an absolute PWM value (normally in range of 1000~2000)."]
3747    MOTOR_TEST_THROTTLE_PWM = 1,
3748    #[doc = "Throttle pass-through from pilot's transmitter."]
3749    MOTOR_TEST_THROTTLE_PILOT = 2,
3750    #[doc = "Per-motor compass calibration test."]
3751    MOTOR_TEST_COMPASS_CAL = 3,
3752}
3753impl MotorTestThrottleType {
3754    pub const DEFAULT: Self = Self::MOTOR_TEST_THROTTLE_PERCENT;
3755}
3756impl Default for MotorTestThrottleType {
3757    fn default() -> Self {
3758        Self::DEFAULT
3759    }
3760}
3761#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3762#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3763#[cfg_attr(feature = "serde", serde(tag = "type"))]
3764#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3765#[repr(u32)]
3766pub enum NavVtolLandOptions {
3767    #[doc = "Default autopilot landing behaviour."]
3768    NAV_VTOL_LAND_OPTIONS_DEFAULT = 0,
3769    #[doc = "Descend in fixed wing mode, transitioning to multicopter mode for vertical landing when close to the ground.           The fixed wing descent pattern is at the discretion of the vehicle (e.g. transition altitude, loiter direction, radius, and speed, etc.)."]
3770    NAV_VTOL_LAND_OPTIONS_FW_DESCENT = 1,
3771    #[doc = "Land in multicopter mode on reaching the landing coordinates (the whole landing is by \"hover descent\")."]
3772    NAV_VTOL_LAND_OPTIONS_HOVER_DESCENT = 2,
3773}
3774impl NavVtolLandOptions {
3775    pub const DEFAULT: Self = Self::NAV_VTOL_LAND_OPTIONS_DEFAULT;
3776}
3777impl Default for NavVtolLandOptions {
3778    fn default() -> Self {
3779        Self::DEFAULT
3780    }
3781}
3782#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3783#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3784#[cfg_attr(feature = "serde", serde(tag = "type"))]
3785#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3786#[repr(u32)]
3787#[doc = "Yaw behaviour during orbit flight."]
3788pub enum OrbitYawBehaviour {
3789    #[doc = "Vehicle front points to the center (default)."]
3790    ORBIT_YAW_BEHAVIOUR_HOLD_FRONT_TO_CIRCLE_CENTER = 0,
3791    #[doc = "Vehicle front holds heading when message received."]
3792    ORBIT_YAW_BEHAVIOUR_HOLD_INITIAL_HEADING = 1,
3793    #[doc = "Yaw uncontrolled."]
3794    ORBIT_YAW_BEHAVIOUR_UNCONTROLLED = 2,
3795    #[doc = "Vehicle front follows flight path (tangential to circle)."]
3796    ORBIT_YAW_BEHAVIOUR_HOLD_FRONT_TANGENT_TO_CIRCLE = 3,
3797    #[doc = "Yaw controlled by RC input."]
3798    ORBIT_YAW_BEHAVIOUR_RC_CONTROLLED = 4,
3799    #[doc = "Vehicle uses current yaw behaviour (unchanged). The vehicle-default yaw behaviour is used if this value is specified when orbit is first commanded."]
3800    ORBIT_YAW_BEHAVIOUR_UNCHANGED = 5,
3801}
3802impl OrbitYawBehaviour {
3803    pub const DEFAULT: Self = Self::ORBIT_YAW_BEHAVIOUR_HOLD_FRONT_TO_CIRCLE_CENTER;
3804}
3805impl Default for OrbitYawBehaviour {
3806    fn default() -> Self {
3807        Self::DEFAULT
3808    }
3809}
3810#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3811#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3812#[cfg_attr(feature = "serde", serde(tag = "type"))]
3813#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3814#[repr(u32)]
3815#[doc = "Parachute actions. Trigger release and enable/disable auto-release."]
3816pub enum ParachuteAction {
3817    #[doc = "Disable auto-release of parachute (i.e. release triggered by crash detectors)."]
3818    PARACHUTE_DISABLE = 0,
3819    #[doc = "Enable auto-release of parachute."]
3820    PARACHUTE_ENABLE = 1,
3821    #[doc = "Release parachute and kill motors."]
3822    PARACHUTE_RELEASE = 2,
3823}
3824impl ParachuteAction {
3825    pub const DEFAULT: Self = Self::PARACHUTE_DISABLE;
3826}
3827impl Default for ParachuteAction {
3828    fn default() -> Self {
3829        Self::DEFAULT
3830    }
3831}
3832#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3833#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3834#[cfg_attr(feature = "serde", serde(tag = "type"))]
3835#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3836#[repr(u32)]
3837#[doc = "Result from PARAM_EXT_SET message."]
3838pub enum ParamAck {
3839    #[doc = "Parameter value ACCEPTED and SET"]
3840    PARAM_ACK_ACCEPTED = 0,
3841    #[doc = "Parameter value UNKNOWN/UNSUPPORTED"]
3842    PARAM_ACK_VALUE_UNSUPPORTED = 1,
3843    #[doc = "Parameter failed to set"]
3844    PARAM_ACK_FAILED = 2,
3845    #[doc = "Parameter value received but not yet set/accepted. A subsequent PARAM_EXT_ACK with the final result will follow once operation is completed. This is returned immediately for parameters that take longer to set, indicating that the the parameter was received and does not need to be resent."]
3846    PARAM_ACK_IN_PROGRESS = 3,
3847}
3848impl ParamAck {
3849    pub const DEFAULT: Self = Self::PARAM_ACK_ACCEPTED;
3850}
3851impl Default for ParamAck {
3852    fn default() -> Self {
3853        Self::DEFAULT
3854    }
3855}
3856bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Bitmap to indicate which dimensions should be ignored by the vehicle: a value of 0b0000000000000000 or 0b0000001000000000 indicates that none of the setpoint dimensions should be ignored. If bit 9 is set the floats afx afy afz should be interpreted as force instead of acceleration."] pub struct PositionTargetTypemask : u16 { # [doc = "Ignore position x"] const POSITION_TARGET_TYPEMASK_X_IGNORE = 1 ; # [doc = "Ignore position y"] const POSITION_TARGET_TYPEMASK_Y_IGNORE = 2 ; # [doc = "Ignore position z"] const POSITION_TARGET_TYPEMASK_Z_IGNORE = 4 ; # [doc = "Ignore velocity x"] const POSITION_TARGET_TYPEMASK_VX_IGNORE = 8 ; # [doc = "Ignore velocity y"] const POSITION_TARGET_TYPEMASK_VY_IGNORE = 16 ; # [doc = "Ignore velocity z"] const POSITION_TARGET_TYPEMASK_VZ_IGNORE = 32 ; # [doc = "Ignore acceleration x"] const POSITION_TARGET_TYPEMASK_AX_IGNORE = 64 ; # [doc = "Ignore acceleration y"] const POSITION_TARGET_TYPEMASK_AY_IGNORE = 128 ; # [doc = "Ignore acceleration z"] const POSITION_TARGET_TYPEMASK_AZ_IGNORE = 256 ; # [doc = "Use force instead of acceleration"] const POSITION_TARGET_TYPEMASK_FORCE_SET = 512 ; # [doc = "Ignore yaw"] const POSITION_TARGET_TYPEMASK_YAW_IGNORE = 1024 ; # [doc = "Ignore yaw rate"] const POSITION_TARGET_TYPEMASK_YAW_RATE_IGNORE = 2048 ; } }
3857impl PositionTargetTypemask {
3858    pub const DEFAULT: Self = Self::POSITION_TARGET_TYPEMASK_X_IGNORE;
3859}
3860impl Default for PositionTargetTypemask {
3861    fn default() -> Self {
3862        Self::DEFAULT
3863    }
3864}
3865#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3866#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3867#[cfg_attr(feature = "serde", serde(tag = "type"))]
3868#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3869#[repr(u32)]
3870#[doc = "Precision land modes (used in MAV_CMD_NAV_LAND)."]
3871pub enum PrecisionLandMode {
3872    #[doc = "Normal (non-precision) landing."]
3873    PRECISION_LAND_MODE_DISABLED = 0,
3874    #[doc = "Use precision landing if beacon detected when land command accepted, otherwise land normally."]
3875    PRECISION_LAND_MODE_OPPORTUNISTIC = 1,
3876    #[doc = "Use precision landing, searching for beacon if not found when land command accepted (land normally if beacon cannot be found)."]
3877    PRECISION_LAND_MODE_REQUIRED = 2,
3878}
3879impl PrecisionLandMode {
3880    pub const DEFAULT: Self = Self::PRECISION_LAND_MODE_DISABLED;
3881}
3882impl Default for PrecisionLandMode {
3883    fn default() -> Self {
3884        Self::DEFAULT
3885    }
3886}
3887#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3888#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3889#[cfg_attr(feature = "serde", serde(tag = "type"))]
3890#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3891#[repr(u32)]
3892#[doc = "Actions for reading and writing plan information (mission, rally points, geofence) between persistent and volatile storage when using MAV_CMD_PREFLIGHT_STORAGE.         (Commonly missions are loaded from persistent storage (flash/EEPROM) into volatile storage (RAM) on startup and written back when they are changed.)"]
3893pub enum PreflightStorageMissionAction {
3894    #[doc = "Read current mission data from persistent storage"]
3895    MISSION_READ_PERSISTENT = 0,
3896    #[doc = "Write current mission data to persistent storage"]
3897    MISSION_WRITE_PERSISTENT = 1,
3898    #[doc = "Erase all mission data stored on the vehicle (both persistent and volatile storage)"]
3899    MISSION_RESET_DEFAULT = 2,
3900}
3901impl PreflightStorageMissionAction {
3902    pub const DEFAULT: Self = Self::MISSION_READ_PERSISTENT;
3903}
3904impl Default for PreflightStorageMissionAction {
3905    fn default() -> Self {
3906        Self::DEFAULT
3907    }
3908}
3909#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3910#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3911#[cfg_attr(feature = "serde", serde(tag = "type"))]
3912#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3913#[repr(u32)]
3914#[doc = "Actions for reading/writing parameters between persistent and volatile storage when using MAV_CMD_PREFLIGHT_STORAGE.         (Commonly parameters are loaded from persistent storage (flash/EEPROM) into volatile storage (RAM) on startup and written back when they are changed.)"]
3915pub enum PreflightStorageParameterAction {
3916    #[doc = "Read all parameters from persistent storage. Replaces values in volatile storage."]
3917    PARAM_READ_PERSISTENT = 0,
3918    #[doc = "Write all parameter values to persistent storage (flash/EEPROM)"]
3919    PARAM_WRITE_PERSISTENT = 1,
3920    #[doc = "Reset all user configurable parameters to their default value (including airframe selection, sensor calibration data, safety settings, and so on). Does not reset values that contain operation counters and vehicle computed statistics."]
3921    PARAM_RESET_CONFIG_DEFAULT = 2,
3922    #[doc = "Reset only sensor calibration parameters to factory defaults (or firmware default if not available)"]
3923    PARAM_RESET_SENSOR_DEFAULT = 3,
3924    #[doc = "Reset all parameters, including operation counters, to default values"]
3925    PARAM_RESET_ALL_DEFAULT = 4,
3926}
3927impl PreflightStorageParameterAction {
3928    pub const DEFAULT: Self = Self::PARAM_READ_PERSISTENT;
3929}
3930impl Default for PreflightStorageParameterAction {
3931    fn default() -> Self {
3932        Self::DEFAULT
3933    }
3934}
3935#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3936#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3937#[cfg_attr(feature = "serde", serde(tag = "type"))]
3938#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3939#[repr(u32)]
3940#[doc = "RC sub-type of types defined in RC_TYPE. Used in MAV_CMD_START_RX_PAIR. Ignored if value does not correspond to the set RC_TYPE."]
3941pub enum RcSubType {
3942    #[doc = "Spektrum DSM2"]
3943    RC_SUB_TYPE_SPEKTRUM_DSM2 = 0,
3944    #[doc = "Spektrum DSMX"]
3945    RC_SUB_TYPE_SPEKTRUM_DSMX = 1,
3946    #[doc = "Spektrum DSMX8"]
3947    RC_SUB_TYPE_SPEKTRUM_DSMX8 = 2,
3948}
3949impl RcSubType {
3950    pub const DEFAULT: Self = Self::RC_SUB_TYPE_SPEKTRUM_DSM2;
3951}
3952impl Default for RcSubType {
3953    fn default() -> Self {
3954        Self::DEFAULT
3955    }
3956}
3957#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3958#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3959#[cfg_attr(feature = "serde", serde(tag = "type"))]
3960#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3961#[repr(u32)]
3962#[doc = "RC type. Used in MAV_CMD_START_RX_PAIR."]
3963pub enum RcType {
3964    #[doc = "Spektrum"]
3965    RC_TYPE_SPEKTRUM = 0,
3966    #[doc = "CRSF"]
3967    RC_TYPE_CRSF = 1,
3968}
3969impl RcType {
3970    pub const DEFAULT: Self = Self::RC_TYPE_SPEKTRUM;
3971}
3972impl Default for RcType {
3973    fn default() -> Self {
3974        Self::DEFAULT
3975    }
3976}
3977#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3978#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3979#[cfg_attr(feature = "serde", serde(tag = "type"))]
3980#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3981#[repr(u32)]
3982#[doc = "Specifies the conditions under which the MAV_CMD_PREFLIGHT_REBOOT_SHUTDOWN command should be accepted."]
3983pub enum RebootShutdownConditions {
3984    #[doc = "Reboot/Shutdown only if allowed by safety checks, such as being landed."]
3985    REBOOT_SHUTDOWN_CONDITIONS_SAFETY_INTERLOCKED = 0,
3986    #[doc = "Force reboot/shutdown of the autopilot/component regardless of system state."]
3987    REBOOT_SHUTDOWN_CONDITIONS_FORCE = 20190226,
3988}
3989impl RebootShutdownConditions {
3990    pub const DEFAULT: Self = Self::REBOOT_SHUTDOWN_CONDITIONS_SAFETY_INTERLOCKED;
3991}
3992impl Default for RebootShutdownConditions {
3993    fn default() -> Self {
3994        Self::DEFAULT
3995    }
3996}
3997#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3998#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3999#[cfg_attr(feature = "serde", serde(tag = "type"))]
4000#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4001#[repr(u32)]
4002#[doc = "RTK GPS baseline coordinate system, used for RTK corrections"]
4003pub enum RtkBaselineCoordinateSystem {
4004    #[doc = "Earth-centered, Earth-fixed"]
4005    RTK_BASELINE_COORDINATE_SYSTEM_ECEF = 0,
4006    #[doc = "RTK basestation centered, north, east, down"]
4007    RTK_BASELINE_COORDINATE_SYSTEM_NED = 1,
4008}
4009impl RtkBaselineCoordinateSystem {
4010    pub const DEFAULT: Self = Self::RTK_BASELINE_COORDINATE_SYSTEM_ECEF;
4011}
4012impl Default for RtkBaselineCoordinateSystem {
4013    fn default() -> Self {
4014        Self::DEFAULT
4015    }
4016}
4017#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4018#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4019#[cfg_attr(feature = "serde", serde(tag = "type"))]
4020#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4021#[repr(u32)]
4022#[doc = "Possible safety switch states."]
4023pub enum SafetySwitchState {
4024    #[doc = "Safety switch is engaged and vehicle should be safe to approach."]
4025    SAFETY_SWITCH_STATE_SAFE = 0,
4026    #[doc = "Safety switch is NOT engaged and motors, propellers and other actuators should be considered active."]
4027    SAFETY_SWITCH_STATE_DANGEROUS = 1,
4028}
4029impl SafetySwitchState {
4030    pub const DEFAULT: Self = Self::SAFETY_SWITCH_STATE_SAFE;
4031}
4032impl Default for SafetySwitchState {
4033    fn default() -> Self {
4034        Self::DEFAULT
4035    }
4036}
4037#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4038#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4039#[cfg_attr(feature = "serde", serde(tag = "type"))]
4040#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4041#[repr(u32)]
4042#[doc = "SERIAL_CONTROL device types"]
4043pub enum SerialControlDev {
4044    #[doc = "First telemetry port"]
4045    SERIAL_CONTROL_DEV_TELEM1 = 0,
4046    #[doc = "Second telemetry port"]
4047    SERIAL_CONTROL_DEV_TELEM2 = 1,
4048    #[doc = "First GPS port"]
4049    SERIAL_CONTROL_DEV_GPS1 = 2,
4050    #[doc = "Second GPS port"]
4051    SERIAL_CONTROL_DEV_GPS2 = 3,
4052    #[doc = "system shell"]
4053    SERIAL_CONTROL_DEV_SHELL = 10,
4054    #[doc = "SERIAL0"]
4055    SERIAL_CONTROL_SERIAL0 = 100,
4056    #[doc = "SERIAL1"]
4057    SERIAL_CONTROL_SERIAL1 = 101,
4058    #[doc = "SERIAL2"]
4059    SERIAL_CONTROL_SERIAL2 = 102,
4060    #[doc = "SERIAL3"]
4061    SERIAL_CONTROL_SERIAL3 = 103,
4062    #[doc = "SERIAL4"]
4063    SERIAL_CONTROL_SERIAL4 = 104,
4064    #[doc = "SERIAL5"]
4065    SERIAL_CONTROL_SERIAL5 = 105,
4066    #[doc = "SERIAL6"]
4067    SERIAL_CONTROL_SERIAL6 = 106,
4068    #[doc = "SERIAL7"]
4069    SERIAL_CONTROL_SERIAL7 = 107,
4070    #[doc = "SERIAL8"]
4071    SERIAL_CONTROL_SERIAL8 = 108,
4072    #[doc = "SERIAL9"]
4073    SERIAL_CONTROL_SERIAL9 = 109,
4074}
4075impl SerialControlDev {
4076    pub const DEFAULT: Self = Self::SERIAL_CONTROL_DEV_TELEM1;
4077}
4078impl Default for SerialControlDev {
4079    fn default() -> Self {
4080        Self::DEFAULT
4081    }
4082}
4083bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "SERIAL_CONTROL flags (bitmask)"] pub struct SerialControlFlag : u8 { # [doc = "Set if this is a reply"] const SERIAL_CONTROL_FLAG_REPLY = 1 ; # [doc = "Set if the sender wants the receiver to send a response as another SERIAL_CONTROL message"] const SERIAL_CONTROL_FLAG_RESPOND = 2 ; # [doc = "Set if access to the serial port should be removed from whatever driver is currently using it, giving exclusive access to the SERIAL_CONTROL protocol. The port can be handed back by sending a request without this flag set"] const SERIAL_CONTROL_FLAG_EXCLUSIVE = 4 ; # [doc = "Block on writes to the serial port"] const SERIAL_CONTROL_FLAG_BLOCKING = 8 ; # [doc = "Send multiple replies until port is drained"] const SERIAL_CONTROL_FLAG_MULTI = 16 ; } }
4084impl SerialControlFlag {
4085    pub const DEFAULT: Self = Self::SERIAL_CONTROL_FLAG_REPLY;
4086}
4087impl Default for SerialControlFlag {
4088    fn default() -> Self {
4089        Self::DEFAULT
4090    }
4091}
4092#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4093#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4094#[cfg_attr(feature = "serde", serde(tag = "type"))]
4095#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4096#[repr(u32)]
4097#[doc = "Focus types for MAV_CMD_SET_CAMERA_FOCUS"]
4098pub enum SetFocusType {
4099    #[doc = "Focus one step increment (-1 for focusing in, 1 for focusing out towards infinity)."]
4100    FOCUS_TYPE_STEP = 0,
4101    #[doc = "Continuous normalized focus in/out rate until stopped. Range -1..1, negative: in, positive: out towards infinity, 0 to stop focusing. Other values should be clipped to the range."]
4102    FOCUS_TYPE_CONTINUOUS = 1,
4103    #[doc = "Focus value as proportion of full camera focus range (a value between 0.0 and 100.0)"]
4104    FOCUS_TYPE_RANGE = 2,
4105    #[doc = "Focus value in metres. Note that there is no message to get the valid focus range of the camera, so this can type can only be used for cameras where the range is known (implying that this cannot reliably be used in a GCS for an arbitrary camera)."]
4106    FOCUS_TYPE_METERS = 3,
4107    #[doc = "Focus automatically."]
4108    FOCUS_TYPE_AUTO = 4,
4109    #[doc = "Single auto focus. Mainly used for still pictures. Usually abbreviated as AF-S."]
4110    FOCUS_TYPE_AUTO_SINGLE = 5,
4111    #[doc = "Continuous auto focus. Mainly used for dynamic scenes. Abbreviated as AF-C."]
4112    FOCUS_TYPE_AUTO_CONTINUOUS = 6,
4113}
4114impl SetFocusType {
4115    pub const DEFAULT: Self = Self::FOCUS_TYPE_STEP;
4116}
4117impl Default for SetFocusType {
4118    fn default() -> Self {
4119        Self::DEFAULT
4120    }
4121}
4122#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4123#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4124#[cfg_attr(feature = "serde", serde(tag = "type"))]
4125#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4126#[repr(u32)]
4127#[doc = "Speed setpoint types used in MAV_CMD_DO_CHANGE_SPEED"]
4128pub enum SpeedType {
4129    #[doc = "Airspeed"]
4130    SPEED_TYPE_AIRSPEED = 0,
4131    #[doc = "Groundspeed"]
4132    SPEED_TYPE_GROUNDSPEED = 1,
4133    #[doc = "Climb speed"]
4134    SPEED_TYPE_CLIMB_SPEED = 2,
4135    #[doc = "Descent speed"]
4136    SPEED_TYPE_DESCENT_SPEED = 3,
4137}
4138impl SpeedType {
4139    pub const DEFAULT: Self = Self::SPEED_TYPE_AIRSPEED;
4140}
4141impl Default for SpeedType {
4142    fn default() -> Self {
4143        Self::DEFAULT
4144    }
4145}
4146#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4147#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4148#[cfg_attr(feature = "serde", serde(tag = "type"))]
4149#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4150#[repr(u32)]
4151#[doc = "Flags to indicate the status of camera storage."]
4152pub enum StorageStatus {
4153    #[doc = "Storage is missing (no microSD card loaded for example.)"]
4154    STORAGE_STATUS_EMPTY = 0,
4155    #[doc = "Storage present but unformatted."]
4156    STORAGE_STATUS_UNFORMATTED = 1,
4157    #[doc = "Storage present and ready."]
4158    STORAGE_STATUS_READY = 2,
4159    #[doc = "Camera does not supply storage status information. Capacity information in STORAGE_INFORMATION fields will be ignored."]
4160    STORAGE_STATUS_NOT_SUPPORTED = 3,
4161}
4162impl StorageStatus {
4163    pub const DEFAULT: Self = Self::STORAGE_STATUS_EMPTY;
4164}
4165impl Default for StorageStatus {
4166    fn default() -> Self {
4167        Self::DEFAULT
4168    }
4169}
4170#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4171#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4172#[cfg_attr(feature = "serde", serde(tag = "type"))]
4173#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4174#[repr(u32)]
4175#[doc = "Flags to indicate the type of storage."]
4176pub enum StorageType {
4177    #[doc = "Storage type is not known."]
4178    STORAGE_TYPE_UNKNOWN = 0,
4179    #[doc = "Storage type is USB device."]
4180    STORAGE_TYPE_USB_STICK = 1,
4181    #[doc = "Storage type is SD card."]
4182    STORAGE_TYPE_SD = 2,
4183    #[doc = "Storage type is microSD card."]
4184    STORAGE_TYPE_MICROSD = 3,
4185    #[doc = "Storage type is CFast."]
4186    STORAGE_TYPE_CF = 4,
4187    #[doc = "Storage type is CFexpress."]
4188    STORAGE_TYPE_CFE = 5,
4189    #[doc = "Storage type is XQD."]
4190    STORAGE_TYPE_XQD = 6,
4191    #[doc = "Storage type is HD mass storage type."]
4192    STORAGE_TYPE_HD = 7,
4193    #[doc = "Storage type is other, not listed type."]
4194    STORAGE_TYPE_OTHER = 254,
4195}
4196impl StorageType {
4197    pub const DEFAULT: Self = Self::STORAGE_TYPE_UNKNOWN;
4198}
4199impl Default for StorageType {
4200    fn default() -> Self {
4201        Self::DEFAULT
4202    }
4203}
4204bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags to indicate usage for a particular storage (see STORAGE_INFORMATION.storage_usage and MAV_CMD_SET_STORAGE_USAGE)."] pub struct StorageUsageFlag : u8 { # [doc = "Always set to 1 (indicates STORAGE_INFORMATION.storage_usage is supported)."] const STORAGE_USAGE_FLAG_SET = 1 ; # [doc = "Storage for saving photos."] const STORAGE_USAGE_FLAG_PHOTO = 2 ; # [doc = "Storage for saving videos."] const STORAGE_USAGE_FLAG_VIDEO = 4 ; # [doc = "Storage for saving logs."] const STORAGE_USAGE_FLAG_LOGS = 8 ; } }
4205impl StorageUsageFlag {
4206    pub const DEFAULT: Self = Self::STORAGE_USAGE_FLAG_SET;
4207}
4208impl Default for StorageUsageFlag {
4209    fn default() -> Self {
4210        Self::DEFAULT
4211    }
4212}
4213#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4214#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4215#[cfg_attr(feature = "serde", serde(tag = "type"))]
4216#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4217#[repr(u32)]
4218#[doc = "Tune formats (used for vehicle buzzer/tone generation)."]
4219pub enum TuneFormat {
4220    #[doc = "Format is QBasic 1.1 Play: <https://www.qbasic.net/en/reference/qb11/Statement/PLAY-006.htm>."]
4221    TUNE_FORMAT_QBASIC1_1 = 1,
4222    #[doc = "Format is Modern Music Markup Language (MML): <https://en.wikipedia.org/wiki/Music_Macro_Language#Modern_MML>."]
4223    TUNE_FORMAT_MML_MODERN = 2,
4224}
4225impl TuneFormat {
4226    pub const DEFAULT: Self = Self::TUNE_FORMAT_QBASIC1_1;
4227}
4228impl Default for TuneFormat {
4229    fn default() -> Self {
4230        Self::DEFAULT
4231    }
4232}
4233#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4234#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4235#[cfg_attr(feature = "serde", serde(tag = "type"))]
4236#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4237#[repr(u32)]
4238#[doc = "Generalized UAVCAN node health"]
4239pub enum UavcanNodeHealth {
4240    #[doc = "The node is functioning properly."]
4241    UAVCAN_NODE_HEALTH_OK = 0,
4242    #[doc = "A critical parameter went out of range or the node has encountered a minor failure."]
4243    UAVCAN_NODE_HEALTH_WARNING = 1,
4244    #[doc = "The node has encountered a major failure."]
4245    UAVCAN_NODE_HEALTH_ERROR = 2,
4246    #[doc = "The node has suffered a fatal malfunction."]
4247    UAVCAN_NODE_HEALTH_CRITICAL = 3,
4248}
4249impl UavcanNodeHealth {
4250    pub const DEFAULT: Self = Self::UAVCAN_NODE_HEALTH_OK;
4251}
4252impl Default for UavcanNodeHealth {
4253    fn default() -> Self {
4254        Self::DEFAULT
4255    }
4256}
4257#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4258#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4259#[cfg_attr(feature = "serde", serde(tag = "type"))]
4260#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4261#[repr(u32)]
4262#[doc = "Generalized UAVCAN node mode"]
4263pub enum UavcanNodeMode {
4264    #[doc = "The node is performing its primary functions."]
4265    UAVCAN_NODE_MODE_OPERATIONAL = 0,
4266    #[doc = "The node is initializing; this mode is entered immediately after startup."]
4267    UAVCAN_NODE_MODE_INITIALIZATION = 1,
4268    #[doc = "The node is under maintenance."]
4269    UAVCAN_NODE_MODE_MAINTENANCE = 2,
4270    #[doc = "The node is in the process of updating its software."]
4271    UAVCAN_NODE_MODE_SOFTWARE_UPDATE = 3,
4272    #[doc = "The node is no longer available online."]
4273    UAVCAN_NODE_MODE_OFFLINE = 7,
4274}
4275impl UavcanNodeMode {
4276    pub const DEFAULT: Self = Self::UAVCAN_NODE_MODE_OPERATIONAL;
4277}
4278impl Default for UavcanNodeMode {
4279    fn default() -> Self {
4280        Self::DEFAULT
4281    }
4282}
4283bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags for the global position report."] pub struct UtmDataAvailFlags : u8 { # [doc = "The field time contains valid data."] const UTM_DATA_AVAIL_FLAGS_TIME_VALID = 1 ; # [doc = "The field uas_id contains valid data."] const UTM_DATA_AVAIL_FLAGS_UAS_ID_AVAILABLE = 2 ; # [doc = "The fields lat, lon and h_acc contain valid data."] const UTM_DATA_AVAIL_FLAGS_POSITION_AVAILABLE = 4 ; # [doc = "The fields alt and v_acc contain valid data."] const UTM_DATA_AVAIL_FLAGS_ALTITUDE_AVAILABLE = 8 ; # [doc = "The field relative_alt contains valid data."] const UTM_DATA_AVAIL_FLAGS_RELATIVE_ALTITUDE_AVAILABLE = 16 ; # [doc = "The fields vx and vy contain valid data."] const UTM_DATA_AVAIL_FLAGS_HORIZONTAL_VELO_AVAILABLE = 32 ; # [doc = "The field vz contains valid data."] const UTM_DATA_AVAIL_FLAGS_VERTICAL_VELO_AVAILABLE = 64 ; # [doc = "The fields next_lat, next_lon and next_alt contain valid data."] const UTM_DATA_AVAIL_FLAGS_NEXT_WAYPOINT_AVAILABLE = 128 ; } }
4284impl UtmDataAvailFlags {
4285    pub const DEFAULT: Self = Self::UTM_DATA_AVAIL_FLAGS_TIME_VALID;
4286}
4287impl Default for UtmDataAvailFlags {
4288    fn default() -> Self {
4289        Self::DEFAULT
4290    }
4291}
4292#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4293#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4294#[cfg_attr(feature = "serde", serde(tag = "type"))]
4295#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4296#[repr(u32)]
4297#[doc = "Airborne status of UAS."]
4298pub enum UtmFlightState {
4299    #[doc = "The flight state can't be determined."]
4300    UTM_FLIGHT_STATE_UNKNOWN = 1,
4301    #[doc = "UAS on ground."]
4302    UTM_FLIGHT_STATE_GROUND = 2,
4303    #[doc = "UAS airborne."]
4304    UTM_FLIGHT_STATE_AIRBORNE = 3,
4305    #[doc = "UAS is in an emergency flight state."]
4306    UTM_FLIGHT_STATE_EMERGENCY = 16,
4307    #[doc = "UAS has no active controls."]
4308    UTM_FLIGHT_STATE_NOCTRL = 32,
4309}
4310impl UtmFlightState {
4311    pub const DEFAULT: Self = Self::UTM_FLIGHT_STATE_UNKNOWN;
4312}
4313impl Default for UtmFlightState {
4314    fn default() -> Self {
4315        Self::DEFAULT
4316    }
4317}
4318#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4319#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4320#[cfg_attr(feature = "serde", serde(tag = "type"))]
4321#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4322#[repr(u32)]
4323#[doc = "Video stream encodings"]
4324pub enum VideoStreamEncoding {
4325    #[doc = "Stream encoding is unknown"]
4326    VIDEO_STREAM_ENCODING_UNKNOWN = 0,
4327    #[doc = "Stream encoding is H.264"]
4328    VIDEO_STREAM_ENCODING_H264 = 1,
4329    #[doc = "Stream encoding is H.265"]
4330    VIDEO_STREAM_ENCODING_H265 = 2,
4331}
4332impl VideoStreamEncoding {
4333    pub const DEFAULT: Self = Self::VIDEO_STREAM_ENCODING_UNKNOWN;
4334}
4335impl Default for VideoStreamEncoding {
4336    fn default() -> Self {
4337        Self::DEFAULT
4338    }
4339}
4340bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Stream status flags (Bitmap)"] pub struct VideoStreamStatusFlags : u16 { # [doc = "Stream is active (running)"] const VIDEO_STREAM_STATUS_FLAGS_RUNNING = 1 ; # [doc = "Stream is thermal imaging"] const VIDEO_STREAM_STATUS_FLAGS_THERMAL = 2 ; # [doc = "Stream can report absolute thermal range (see CAMERA_THERMAL_RANGE)."] const VIDEO_STREAM_STATUS_FLAGS_THERMAL_RANGE_ENABLED = 4 ; } }
4341impl VideoStreamStatusFlags {
4342    pub const DEFAULT: Self = Self::VIDEO_STREAM_STATUS_FLAGS_RUNNING;
4343}
4344impl Default for VideoStreamStatusFlags {
4345    fn default() -> Self {
4346        Self::DEFAULT
4347    }
4348}
4349#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4350#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4351#[cfg_attr(feature = "serde", serde(tag = "type"))]
4352#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4353#[repr(u32)]
4354#[doc = "Video stream types"]
4355pub enum VideoStreamType {
4356    #[doc = "Stream is RTSP"]
4357    VIDEO_STREAM_TYPE_RTSP = 0,
4358    #[doc = "Stream is RTP UDP (URI gives the port number)"]
4359    VIDEO_STREAM_TYPE_RTPUDP = 1,
4360    #[doc = "Stream is MPEG on TCP"]
4361    VIDEO_STREAM_TYPE_TCP_MPEG = 2,
4362    #[doc = "Stream is MPEG TS (URI gives the port number)"]
4363    VIDEO_STREAM_TYPE_MPEG_TS = 3,
4364}
4365impl VideoStreamType {
4366    pub const DEFAULT: Self = Self::VIDEO_STREAM_TYPE_RTSP;
4367}
4368impl Default for VideoStreamType {
4369    fn default() -> Self {
4370        Self::DEFAULT
4371    }
4372}
4373#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4374#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4375#[cfg_attr(feature = "serde", serde(tag = "type"))]
4376#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4377#[repr(u32)]
4378#[doc = "Direction of VTOL transition"]
4379pub enum VtolTransitionHeading {
4380    #[doc = "Respect the heading configuration of the vehicle."]
4381    VTOL_TRANSITION_HEADING_VEHICLE_DEFAULT = 0,
4382    #[doc = "Use the heading pointing towards the next waypoint."]
4383    VTOL_TRANSITION_HEADING_NEXT_WAYPOINT = 1,
4384    #[doc = "Use the heading on takeoff (while sitting on the ground)."]
4385    VTOL_TRANSITION_HEADING_TAKEOFF = 2,
4386    #[doc = "Use the specified heading in parameter 4."]
4387    VTOL_TRANSITION_HEADING_SPECIFIED = 3,
4388    #[doc = "Use the current heading when reaching takeoff altitude (potentially facing the wind when weather-vaning is active)."]
4389    VTOL_TRANSITION_HEADING_ANY = 4,
4390}
4391impl VtolTransitionHeading {
4392    pub const DEFAULT: Self = Self::VTOL_TRANSITION_HEADING_VEHICLE_DEFAULT;
4393}
4394impl Default for VtolTransitionHeading {
4395    fn default() -> Self {
4396        Self::DEFAULT
4397    }
4398}
4399#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4400#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4401#[cfg_attr(feature = "serde", serde(tag = "type"))]
4402#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4403#[repr(u32)]
4404#[doc = "WiFi Mode."]
4405pub enum WifiConfigApMode {
4406    #[doc = "WiFi mode is undefined."]
4407    WIFI_CONFIG_AP_MODE_UNDEFINED = 0,
4408    #[doc = "WiFi configured as an access point."]
4409    WIFI_CONFIG_AP_MODE_AP = 1,
4410    #[doc = "WiFi configured as a station connected to an existing local WiFi network."]
4411    WIFI_CONFIG_AP_MODE_STATION = 2,
4412    #[doc = "WiFi disabled."]
4413    WIFI_CONFIG_AP_MODE_DISABLED = 3,
4414}
4415impl WifiConfigApMode {
4416    pub const DEFAULT: Self = Self::WIFI_CONFIG_AP_MODE_UNDEFINED;
4417}
4418impl Default for WifiConfigApMode {
4419    fn default() -> Self {
4420        Self::DEFAULT
4421    }
4422}
4423#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4424#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4425#[cfg_attr(feature = "serde", serde(tag = "type"))]
4426#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4427#[repr(u32)]
4428#[doc = "Possible responses from a WIFI_CONFIG_AP message."]
4429pub enum WifiConfigApResponse {
4430    #[doc = "Undefined response. Likely an indicative of a system that doesn't support this request."]
4431    WIFI_CONFIG_AP_RESPONSE_UNDEFINED = 0,
4432    #[doc = "Changes accepted."]
4433    WIFI_CONFIG_AP_RESPONSE_ACCEPTED = 1,
4434    #[doc = "Changes rejected."]
4435    WIFI_CONFIG_AP_RESPONSE_REJECTED = 2,
4436    #[doc = "Invalid Mode."]
4437    WIFI_CONFIG_AP_RESPONSE_MODE_ERROR = 3,
4438    #[doc = "Invalid SSID."]
4439    WIFI_CONFIG_AP_RESPONSE_SSID_ERROR = 4,
4440    #[doc = "Invalid Password."]
4441    WIFI_CONFIG_AP_RESPONSE_PASSWORD_ERROR = 5,
4442}
4443impl WifiConfigApResponse {
4444    pub const DEFAULT: Self = Self::WIFI_CONFIG_AP_RESPONSE_UNDEFINED;
4445}
4446impl Default for WifiConfigApResponse {
4447    fn default() -> Self {
4448        Self::DEFAULT
4449    }
4450}
4451#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4452#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4453#[cfg_attr(feature = "serde", serde(tag = "type"))]
4454#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4455#[repr(u32)]
4456#[doc = "Winch actions."]
4457pub enum WinchActions {
4458    #[doc = "Allow motor to freewheel."]
4459    WINCH_RELAXED = 0,
4460    #[doc = "Wind or unwind specified length of line, optionally using specified rate."]
4461    WINCH_RELATIVE_LENGTH_CONTROL = 1,
4462    #[doc = "Wind or unwind line at specified rate."]
4463    WINCH_RATE_CONTROL = 2,
4464    #[doc = "Perform the locking sequence to relieve motor while in the fully retracted position. Only action and instance command parameters are used, others are ignored."]
4465    WINCH_LOCK = 3,
4466    #[doc = "Sequence of drop, slow down, touch down, reel up, lock. Only action and instance command parameters are used, others are ignored."]
4467    WINCH_DELIVER = 4,
4468    #[doc = "Engage motor and hold current position. Only action and instance command parameters are used, others are ignored."]
4469    WINCH_HOLD = 5,
4470    #[doc = "Return the reel to the fully retracted position. Only action and instance command parameters are used, others are ignored."]
4471    WINCH_RETRACT = 6,
4472    #[doc = "Load the reel with line. The winch will calculate the total loaded length and stop when the tension exceeds a threshold. Only action and instance command parameters are used, others are ignored."]
4473    WINCH_LOAD_LINE = 7,
4474    #[doc = "Spool out the entire length of the line. Only action and instance command parameters are used, others are ignored."]
4475    WINCH_ABANDON_LINE = 8,
4476    #[doc = "Spools out just enough to present the hook to the user to load the payload. Only action and instance command parameters are used, others are ignored"]
4477    WINCH_LOAD_PAYLOAD = 9,
4478}
4479impl WinchActions {
4480    pub const DEFAULT: Self = Self::WINCH_RELAXED;
4481}
4482impl Default for WinchActions {
4483    fn default() -> Self {
4484        Self::DEFAULT
4485    }
4486}
4487#[doc = "Set the vehicle attitude and body angular rates."]
4488#[doc = ""]
4489#[doc = "ID: 140"]
4490#[derive(Debug, Clone, PartialEq)]
4491#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4492#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4493pub struct ACTUATOR_CONTROL_TARGET_DATA {
4494    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
4495    pub time_usec: u64,
4496    #[doc = "Actuator controls. Normed to -1..+1 where 0 is neutral position. Throttle for single rotation direction motors is 0..1, negative range for reverse direction. Standard mapping for attitude controls (group 0): (index 0-7): roll, pitch, yaw, throttle, flaps, spoilers, airbrakes, landing gear. Load a pass-through mixer to repurpose them as generic outputs."]
4497    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
4498    pub controls: [f32; 8],
4499    #[doc = "Actuator group. The \"_mlx\" indicates this is a multi-instance message and a MAVLink parser should use this field to difference between instances."]
4500    pub group_mlx: u8,
4501}
4502impl ACTUATOR_CONTROL_TARGET_DATA {
4503    pub const ENCODED_LEN: usize = 41usize;
4504    pub const DEFAULT: Self = Self {
4505        time_usec: 0_u64,
4506        controls: [0.0_f32; 8usize],
4507        group_mlx: 0_u8,
4508    };
4509    #[cfg(feature = "arbitrary")]
4510    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
4511        use arbitrary::{Arbitrary, Unstructured};
4512        let mut buf = [0u8; 1024];
4513        rng.fill_bytes(&mut buf);
4514        let mut unstructured = Unstructured::new(&buf);
4515        Self::arbitrary(&mut unstructured).unwrap_or_default()
4516    }
4517}
4518impl Default for ACTUATOR_CONTROL_TARGET_DATA {
4519    fn default() -> Self {
4520        Self::DEFAULT.clone()
4521    }
4522}
4523impl MessageData for ACTUATOR_CONTROL_TARGET_DATA {
4524    type Message = MavMessage;
4525    const ID: u32 = 140u32;
4526    const NAME: &'static str = "ACTUATOR_CONTROL_TARGET";
4527    const EXTRA_CRC: u8 = 181u8;
4528    const ENCODED_LEN: usize = 41usize;
4529    fn deser(
4530        _version: MavlinkVersion,
4531        __input: &[u8],
4532    ) -> Result<Self, ::mavlink_core::error::ParserError> {
4533        let avail_len = __input.len();
4534        let mut payload_buf = [0; Self::ENCODED_LEN];
4535        let mut buf = if avail_len < Self::ENCODED_LEN {
4536            payload_buf[0..avail_len].copy_from_slice(__input);
4537            Bytes::new(&payload_buf)
4538        } else {
4539            Bytes::new(__input)
4540        };
4541        let mut __struct = Self::default();
4542        __struct.time_usec = buf.get_u64_le();
4543        for v in &mut __struct.controls {
4544            let val = buf.get_f32_le();
4545            *v = val;
4546        }
4547        __struct.group_mlx = buf.get_u8();
4548        Ok(__struct)
4549    }
4550    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
4551        let mut __tmp = BytesMut::new(bytes);
4552        #[allow(clippy::absurd_extreme_comparisons)]
4553        #[allow(unused_comparisons)]
4554        if __tmp.remaining() < Self::ENCODED_LEN {
4555            panic!(
4556                "buffer is too small (need {} bytes, but got {})",
4557                Self::ENCODED_LEN,
4558                __tmp.remaining(),
4559            )
4560        }
4561        __tmp.put_u64_le(self.time_usec);
4562        for val in &self.controls {
4563            __tmp.put_f32_le(*val);
4564        }
4565        __tmp.put_u8(self.group_mlx);
4566        if matches!(version, MavlinkVersion::V2) {
4567            let len = __tmp.len();
4568            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
4569        } else {
4570            __tmp.len()
4571        }
4572    }
4573}
4574#[doc = "The raw values of the actuator outputs (e.g. on Pixhawk, from MAIN, AUX ports). This message supersedes SERVO_OUTPUT_RAW."]
4575#[doc = ""]
4576#[doc = "ID: 375"]
4577#[derive(Debug, Clone, PartialEq)]
4578#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4579#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4580pub struct ACTUATOR_OUTPUT_STATUS_DATA {
4581    #[doc = "Timestamp (since system boot)."]
4582    pub time_usec: u64,
4583    #[doc = "Active outputs"]
4584    pub active: u32,
4585    #[doc = "Servo / motor output array values. Zero values indicate unused channels."]
4586    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
4587    pub actuator: [f32; 32],
4588}
4589impl ACTUATOR_OUTPUT_STATUS_DATA {
4590    pub const ENCODED_LEN: usize = 140usize;
4591    pub const DEFAULT: Self = Self {
4592        time_usec: 0_u64,
4593        active: 0_u32,
4594        actuator: [0.0_f32; 32usize],
4595    };
4596    #[cfg(feature = "arbitrary")]
4597    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
4598        use arbitrary::{Arbitrary, Unstructured};
4599        let mut buf = [0u8; 1024];
4600        rng.fill_bytes(&mut buf);
4601        let mut unstructured = Unstructured::new(&buf);
4602        Self::arbitrary(&mut unstructured).unwrap_or_default()
4603    }
4604}
4605impl Default for ACTUATOR_OUTPUT_STATUS_DATA {
4606    fn default() -> Self {
4607        Self::DEFAULT.clone()
4608    }
4609}
4610impl MessageData for ACTUATOR_OUTPUT_STATUS_DATA {
4611    type Message = MavMessage;
4612    const ID: u32 = 375u32;
4613    const NAME: &'static str = "ACTUATOR_OUTPUT_STATUS";
4614    const EXTRA_CRC: u8 = 251u8;
4615    const ENCODED_LEN: usize = 140usize;
4616    fn deser(
4617        _version: MavlinkVersion,
4618        __input: &[u8],
4619    ) -> Result<Self, ::mavlink_core::error::ParserError> {
4620        let avail_len = __input.len();
4621        let mut payload_buf = [0; Self::ENCODED_LEN];
4622        let mut buf = if avail_len < Self::ENCODED_LEN {
4623            payload_buf[0..avail_len].copy_from_slice(__input);
4624            Bytes::new(&payload_buf)
4625        } else {
4626            Bytes::new(__input)
4627        };
4628        let mut __struct = Self::default();
4629        __struct.time_usec = buf.get_u64_le();
4630        __struct.active = buf.get_u32_le();
4631        for v in &mut __struct.actuator {
4632            let val = buf.get_f32_le();
4633            *v = val;
4634        }
4635        Ok(__struct)
4636    }
4637    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
4638        let mut __tmp = BytesMut::new(bytes);
4639        #[allow(clippy::absurd_extreme_comparisons)]
4640        #[allow(unused_comparisons)]
4641        if __tmp.remaining() < Self::ENCODED_LEN {
4642            panic!(
4643                "buffer is too small (need {} bytes, but got {})",
4644                Self::ENCODED_LEN,
4645                __tmp.remaining(),
4646            )
4647        }
4648        __tmp.put_u64_le(self.time_usec);
4649        __tmp.put_u32_le(self.active);
4650        for val in &self.actuator {
4651            __tmp.put_f32_le(*val);
4652        }
4653        if matches!(version, MavlinkVersion::V2) {
4654            let len = __tmp.len();
4655            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
4656        } else {
4657            __tmp.len()
4658        }
4659    }
4660}
4661#[doc = "The location and information of an ADSB vehicle."]
4662#[doc = ""]
4663#[doc = "ID: 246"]
4664#[derive(Debug, Clone, PartialEq)]
4665#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4666#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4667pub struct ADSB_VEHICLE_DATA {
4668    #[doc = "ICAO address"]
4669    pub ICAO_address: u32,
4670    #[doc = "Latitude"]
4671    pub lat: i32,
4672    #[doc = "Longitude"]
4673    pub lon: i32,
4674    #[doc = "Altitude(ASL)"]
4675    pub altitude: i32,
4676    #[doc = "Course over ground"]
4677    pub heading: u16,
4678    #[doc = "The horizontal velocity"]
4679    pub hor_velocity: u16,
4680    #[doc = "The vertical velocity. Positive is up"]
4681    pub ver_velocity: i16,
4682    #[doc = "Bitmap to indicate various statuses including valid data fields"]
4683    pub flags: AdsbFlags,
4684    #[doc = "Squawk code. Note that the code is in decimal: e.g. 7700 (general emergency) is encoded as binary 0b0001_1110_0001_0100, not(!) as 0b0000_111_111_000_000"]
4685    pub squawk: u16,
4686    #[doc = "ADSB altitude type."]
4687    pub altitude_type: AdsbAltitudeType,
4688    #[doc = "The callsign, 8+null"]
4689    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
4690    pub callsign: [u8; 9],
4691    #[doc = "ADSB emitter type."]
4692    pub emitter_type: AdsbEmitterType,
4693    #[doc = "Time since last communication in seconds"]
4694    pub tslc: u8,
4695}
4696impl ADSB_VEHICLE_DATA {
4697    pub const ENCODED_LEN: usize = 38usize;
4698    pub const DEFAULT: Self = Self {
4699        ICAO_address: 0_u32,
4700        lat: 0_i32,
4701        lon: 0_i32,
4702        altitude: 0_i32,
4703        heading: 0_u16,
4704        hor_velocity: 0_u16,
4705        ver_velocity: 0_i16,
4706        flags: AdsbFlags::DEFAULT,
4707        squawk: 0_u16,
4708        altitude_type: AdsbAltitudeType::DEFAULT,
4709        callsign: [0_u8; 9usize],
4710        emitter_type: AdsbEmitterType::DEFAULT,
4711        tslc: 0_u8,
4712    };
4713    #[cfg(feature = "arbitrary")]
4714    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
4715        use arbitrary::{Arbitrary, Unstructured};
4716        let mut buf = [0u8; 1024];
4717        rng.fill_bytes(&mut buf);
4718        let mut unstructured = Unstructured::new(&buf);
4719        Self::arbitrary(&mut unstructured).unwrap_or_default()
4720    }
4721}
4722impl Default for ADSB_VEHICLE_DATA {
4723    fn default() -> Self {
4724        Self::DEFAULT.clone()
4725    }
4726}
4727impl MessageData for ADSB_VEHICLE_DATA {
4728    type Message = MavMessage;
4729    const ID: u32 = 246u32;
4730    const NAME: &'static str = "ADSB_VEHICLE";
4731    const EXTRA_CRC: u8 = 184u8;
4732    const ENCODED_LEN: usize = 38usize;
4733    fn deser(
4734        _version: MavlinkVersion,
4735        __input: &[u8],
4736    ) -> Result<Self, ::mavlink_core::error::ParserError> {
4737        let avail_len = __input.len();
4738        let mut payload_buf = [0; Self::ENCODED_LEN];
4739        let mut buf = if avail_len < Self::ENCODED_LEN {
4740            payload_buf[0..avail_len].copy_from_slice(__input);
4741            Bytes::new(&payload_buf)
4742        } else {
4743            Bytes::new(__input)
4744        };
4745        let mut __struct = Self::default();
4746        __struct.ICAO_address = buf.get_u32_le();
4747        __struct.lat = buf.get_i32_le();
4748        __struct.lon = buf.get_i32_le();
4749        __struct.altitude = buf.get_i32_le();
4750        __struct.heading = buf.get_u16_le();
4751        __struct.hor_velocity = buf.get_u16_le();
4752        __struct.ver_velocity = buf.get_i16_le();
4753        let tmp = buf.get_u16_le();
4754        __struct.flags = AdsbFlags::from_bits(tmp & AdsbFlags::all().bits()).ok_or(
4755            ::mavlink_core::error::ParserError::InvalidFlag {
4756                flag_type: "AdsbFlags",
4757                value: tmp as u32,
4758            },
4759        )?;
4760        __struct.squawk = buf.get_u16_le();
4761        let tmp = buf.get_u8();
4762        __struct.altitude_type =
4763            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
4764                enum_type: "AdsbAltitudeType",
4765                value: tmp as u32,
4766            })?;
4767        for v in &mut __struct.callsign {
4768            let val = buf.get_u8();
4769            *v = val;
4770        }
4771        let tmp = buf.get_u8();
4772        __struct.emitter_type =
4773            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
4774                enum_type: "AdsbEmitterType",
4775                value: tmp as u32,
4776            })?;
4777        __struct.tslc = buf.get_u8();
4778        Ok(__struct)
4779    }
4780    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
4781        let mut __tmp = BytesMut::new(bytes);
4782        #[allow(clippy::absurd_extreme_comparisons)]
4783        #[allow(unused_comparisons)]
4784        if __tmp.remaining() < Self::ENCODED_LEN {
4785            panic!(
4786                "buffer is too small (need {} bytes, but got {})",
4787                Self::ENCODED_LEN,
4788                __tmp.remaining(),
4789            )
4790        }
4791        __tmp.put_u32_le(self.ICAO_address);
4792        __tmp.put_i32_le(self.lat);
4793        __tmp.put_i32_le(self.lon);
4794        __tmp.put_i32_le(self.altitude);
4795        __tmp.put_u16_le(self.heading);
4796        __tmp.put_u16_le(self.hor_velocity);
4797        __tmp.put_i16_le(self.ver_velocity);
4798        __tmp.put_u16_le(self.flags.bits());
4799        __tmp.put_u16_le(self.squawk);
4800        __tmp.put_u8(self.altitude_type as u8);
4801        for val in &self.callsign {
4802            __tmp.put_u8(*val);
4803        }
4804        __tmp.put_u8(self.emitter_type as u8);
4805        __tmp.put_u8(self.tslc);
4806        if matches!(version, MavlinkVersion::V2) {
4807            let len = __tmp.len();
4808            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
4809        } else {
4810            __tmp.len()
4811        }
4812    }
4813}
4814#[doc = "The location and information of an AIS vessel."]
4815#[doc = ""]
4816#[doc = "ID: 301"]
4817#[derive(Debug, Clone, PartialEq)]
4818#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4819#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4820pub struct AIS_VESSEL_DATA {
4821    #[doc = "Mobile Marine Service Identifier, 9 decimal digits"]
4822    pub MMSI: u32,
4823    #[doc = "Latitude"]
4824    pub lat: i32,
4825    #[doc = "Longitude"]
4826    pub lon: i32,
4827    #[doc = "Course over ground"]
4828    pub COG: u16,
4829    #[doc = "True heading"]
4830    pub heading: u16,
4831    #[doc = "Speed over ground"]
4832    pub velocity: u16,
4833    #[doc = "Distance from lat/lon location to bow"]
4834    pub dimension_bow: u16,
4835    #[doc = "Distance from lat/lon location to stern"]
4836    pub dimension_stern: u16,
4837    #[doc = "Time since last communication in seconds"]
4838    pub tslc: u16,
4839    #[doc = "Bitmask to indicate various statuses including valid data fields"]
4840    pub flags: AisFlags,
4841    #[doc = "Turn rate"]
4842    pub turn_rate: i8,
4843    #[doc = "Navigational status"]
4844    pub navigational_status: AisNavStatus,
4845    #[doc = "Type of vessels"]
4846    pub mavtype: AisType,
4847    #[doc = "Distance from lat/lon location to port side"]
4848    pub dimension_port: u8,
4849    #[doc = "Distance from lat/lon location to starboard side"]
4850    pub dimension_starboard: u8,
4851    #[doc = "The vessel callsign"]
4852    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
4853    pub callsign: [u8; 7],
4854    #[doc = "The vessel name"]
4855    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
4856    pub name: [u8; 20],
4857}
4858impl AIS_VESSEL_DATA {
4859    pub const ENCODED_LEN: usize = 58usize;
4860    pub const DEFAULT: Self = Self {
4861        MMSI: 0_u32,
4862        lat: 0_i32,
4863        lon: 0_i32,
4864        COG: 0_u16,
4865        heading: 0_u16,
4866        velocity: 0_u16,
4867        dimension_bow: 0_u16,
4868        dimension_stern: 0_u16,
4869        tslc: 0_u16,
4870        flags: AisFlags::DEFAULT,
4871        turn_rate: 0_i8,
4872        navigational_status: AisNavStatus::DEFAULT,
4873        mavtype: AisType::DEFAULT,
4874        dimension_port: 0_u8,
4875        dimension_starboard: 0_u8,
4876        callsign: [0_u8; 7usize],
4877        name: [0_u8; 20usize],
4878    };
4879    #[cfg(feature = "arbitrary")]
4880    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
4881        use arbitrary::{Arbitrary, Unstructured};
4882        let mut buf = [0u8; 1024];
4883        rng.fill_bytes(&mut buf);
4884        let mut unstructured = Unstructured::new(&buf);
4885        Self::arbitrary(&mut unstructured).unwrap_or_default()
4886    }
4887}
4888impl Default for AIS_VESSEL_DATA {
4889    fn default() -> Self {
4890        Self::DEFAULT.clone()
4891    }
4892}
4893impl MessageData for AIS_VESSEL_DATA {
4894    type Message = MavMessage;
4895    const ID: u32 = 301u32;
4896    const NAME: &'static str = "AIS_VESSEL";
4897    const EXTRA_CRC: u8 = 243u8;
4898    const ENCODED_LEN: usize = 58usize;
4899    fn deser(
4900        _version: MavlinkVersion,
4901        __input: &[u8],
4902    ) -> Result<Self, ::mavlink_core::error::ParserError> {
4903        let avail_len = __input.len();
4904        let mut payload_buf = [0; Self::ENCODED_LEN];
4905        let mut buf = if avail_len < Self::ENCODED_LEN {
4906            payload_buf[0..avail_len].copy_from_slice(__input);
4907            Bytes::new(&payload_buf)
4908        } else {
4909            Bytes::new(__input)
4910        };
4911        let mut __struct = Self::default();
4912        __struct.MMSI = buf.get_u32_le();
4913        __struct.lat = buf.get_i32_le();
4914        __struct.lon = buf.get_i32_le();
4915        __struct.COG = buf.get_u16_le();
4916        __struct.heading = buf.get_u16_le();
4917        __struct.velocity = buf.get_u16_le();
4918        __struct.dimension_bow = buf.get_u16_le();
4919        __struct.dimension_stern = buf.get_u16_le();
4920        __struct.tslc = buf.get_u16_le();
4921        let tmp = buf.get_u16_le();
4922        __struct.flags = AisFlags::from_bits(tmp & AisFlags::all().bits()).ok_or(
4923            ::mavlink_core::error::ParserError::InvalidFlag {
4924                flag_type: "AisFlags",
4925                value: tmp as u32,
4926            },
4927        )?;
4928        __struct.turn_rate = buf.get_i8();
4929        let tmp = buf.get_u8();
4930        __struct.navigational_status =
4931            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
4932                enum_type: "AisNavStatus",
4933                value: tmp as u32,
4934            })?;
4935        let tmp = buf.get_u8();
4936        __struct.mavtype =
4937            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
4938                enum_type: "AisType",
4939                value: tmp as u32,
4940            })?;
4941        __struct.dimension_port = buf.get_u8();
4942        __struct.dimension_starboard = buf.get_u8();
4943        for v in &mut __struct.callsign {
4944            let val = buf.get_u8();
4945            *v = val;
4946        }
4947        for v in &mut __struct.name {
4948            let val = buf.get_u8();
4949            *v = val;
4950        }
4951        Ok(__struct)
4952    }
4953    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
4954        let mut __tmp = BytesMut::new(bytes);
4955        #[allow(clippy::absurd_extreme_comparisons)]
4956        #[allow(unused_comparisons)]
4957        if __tmp.remaining() < Self::ENCODED_LEN {
4958            panic!(
4959                "buffer is too small (need {} bytes, but got {})",
4960                Self::ENCODED_LEN,
4961                __tmp.remaining(),
4962            )
4963        }
4964        __tmp.put_u32_le(self.MMSI);
4965        __tmp.put_i32_le(self.lat);
4966        __tmp.put_i32_le(self.lon);
4967        __tmp.put_u16_le(self.COG);
4968        __tmp.put_u16_le(self.heading);
4969        __tmp.put_u16_le(self.velocity);
4970        __tmp.put_u16_le(self.dimension_bow);
4971        __tmp.put_u16_le(self.dimension_stern);
4972        __tmp.put_u16_le(self.tslc);
4973        __tmp.put_u16_le(self.flags.bits());
4974        __tmp.put_i8(self.turn_rate);
4975        __tmp.put_u8(self.navigational_status as u8);
4976        __tmp.put_u8(self.mavtype as u8);
4977        __tmp.put_u8(self.dimension_port);
4978        __tmp.put_u8(self.dimension_starboard);
4979        for val in &self.callsign {
4980            __tmp.put_u8(*val);
4981        }
4982        for val in &self.name {
4983            __tmp.put_u8(*val);
4984        }
4985        if matches!(version, MavlinkVersion::V2) {
4986            let len = __tmp.len();
4987            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
4988        } else {
4989            __tmp.len()
4990        }
4991    }
4992}
4993#[doc = "The current system altitude."]
4994#[doc = ""]
4995#[doc = "ID: 141"]
4996#[derive(Debug, Clone, PartialEq)]
4997#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4998#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4999pub struct ALTITUDE_DATA {
5000    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
5001    pub time_usec: u64,
5002    #[doc = "This altitude measure is initialized on system boot and monotonic (it is never reset, but represents the local altitude change). The only guarantee on this field is that it will never be reset and is consistent within a flight. The recommended value for this field is the uncorrected barometric altitude at boot time. This altitude will also drift and vary between flights."]
5003    pub altitude_monotonic: f32,
5004    #[doc = "This altitude measure is strictly above mean sea level and might be non-monotonic (it might reset on events like GPS lock or when a new QNH value is set). It should be the altitude to which global altitude waypoints are compared to. Note that it is *not* the GPS altitude, however, most GPS modules already output MSL by default and not the WGS84 altitude."]
5005    pub altitude_amsl: f32,
5006    #[doc = "This is the local altitude in the local coordinate frame. It is not the altitude above home, but in reference to the coordinate origin (0, 0, 0). It is up-positive."]
5007    pub altitude_local: f32,
5008    #[doc = "This is the altitude above the home position. It resets on each change of the current home position."]
5009    pub altitude_relative: f32,
5010    #[doc = "This is the altitude above terrain. It might be fed by a terrain database or an altimeter. Values smaller than -1000 should be interpreted as unknown."]
5011    pub altitude_terrain: f32,
5012    #[doc = "This is not the altitude, but the clear space below the system according to the fused clearance estimate. It generally should max out at the maximum range of e.g. the laser altimeter. It is generally a moving target. A negative value indicates no measurement available."]
5013    pub bottom_clearance: f32,
5014}
5015impl ALTITUDE_DATA {
5016    pub const ENCODED_LEN: usize = 32usize;
5017    pub const DEFAULT: Self = Self {
5018        time_usec: 0_u64,
5019        altitude_monotonic: 0.0_f32,
5020        altitude_amsl: 0.0_f32,
5021        altitude_local: 0.0_f32,
5022        altitude_relative: 0.0_f32,
5023        altitude_terrain: 0.0_f32,
5024        bottom_clearance: 0.0_f32,
5025    };
5026    #[cfg(feature = "arbitrary")]
5027    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5028        use arbitrary::{Arbitrary, Unstructured};
5029        let mut buf = [0u8; 1024];
5030        rng.fill_bytes(&mut buf);
5031        let mut unstructured = Unstructured::new(&buf);
5032        Self::arbitrary(&mut unstructured).unwrap_or_default()
5033    }
5034}
5035impl Default for ALTITUDE_DATA {
5036    fn default() -> Self {
5037        Self::DEFAULT.clone()
5038    }
5039}
5040impl MessageData for ALTITUDE_DATA {
5041    type Message = MavMessage;
5042    const ID: u32 = 141u32;
5043    const NAME: &'static str = "ALTITUDE";
5044    const EXTRA_CRC: u8 = 47u8;
5045    const ENCODED_LEN: usize = 32usize;
5046    fn deser(
5047        _version: MavlinkVersion,
5048        __input: &[u8],
5049    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5050        let avail_len = __input.len();
5051        let mut payload_buf = [0; Self::ENCODED_LEN];
5052        let mut buf = if avail_len < Self::ENCODED_LEN {
5053            payload_buf[0..avail_len].copy_from_slice(__input);
5054            Bytes::new(&payload_buf)
5055        } else {
5056            Bytes::new(__input)
5057        };
5058        let mut __struct = Self::default();
5059        __struct.time_usec = buf.get_u64_le();
5060        __struct.altitude_monotonic = buf.get_f32_le();
5061        __struct.altitude_amsl = buf.get_f32_le();
5062        __struct.altitude_local = buf.get_f32_le();
5063        __struct.altitude_relative = buf.get_f32_le();
5064        __struct.altitude_terrain = buf.get_f32_le();
5065        __struct.bottom_clearance = buf.get_f32_le();
5066        Ok(__struct)
5067    }
5068    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5069        let mut __tmp = BytesMut::new(bytes);
5070        #[allow(clippy::absurd_extreme_comparisons)]
5071        #[allow(unused_comparisons)]
5072        if __tmp.remaining() < Self::ENCODED_LEN {
5073            panic!(
5074                "buffer is too small (need {} bytes, but got {})",
5075                Self::ENCODED_LEN,
5076                __tmp.remaining(),
5077            )
5078        }
5079        __tmp.put_u64_le(self.time_usec);
5080        __tmp.put_f32_le(self.altitude_monotonic);
5081        __tmp.put_f32_le(self.altitude_amsl);
5082        __tmp.put_f32_le(self.altitude_local);
5083        __tmp.put_f32_le(self.altitude_relative);
5084        __tmp.put_f32_le(self.altitude_terrain);
5085        __tmp.put_f32_le(self.bottom_clearance);
5086        if matches!(version, MavlinkVersion::V2) {
5087            let len = __tmp.len();
5088            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5089        } else {
5090            __tmp.len()
5091        }
5092    }
5093}
5094#[doc = "ASL-fixed-wing controller data."]
5095#[doc = ""]
5096#[doc = "ID: 8004"]
5097#[derive(Debug, Clone, PartialEq)]
5098#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5099#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5100pub struct ASLCTRL_DATA_DATA {
5101    #[doc = "Timestamp"]
5102    pub timestamp: u64,
5103    #[doc = "See sourcecode for a description of these values..."]
5104    pub h: f32,
5105    pub hRef: f32,
5106    pub hRef_t: f32,
5107    #[doc = "Pitch angle"]
5108    pub PitchAngle: f32,
5109    #[doc = "Pitch angle reference"]
5110    pub PitchAngleRef: f32,
5111    pub q: f32,
5112    pub qRef: f32,
5113    pub uElev: f32,
5114    pub uThrot: f32,
5115    pub uThrot2: f32,
5116    pub nZ: f32,
5117    #[doc = "Airspeed reference"]
5118    pub AirspeedRef: f32,
5119    #[doc = "Yaw angle"]
5120    pub YawAngle: f32,
5121    #[doc = "Yaw angle reference"]
5122    pub YawAngleRef: f32,
5123    #[doc = "Roll angle"]
5124    pub RollAngle: f32,
5125    #[doc = "Roll angle reference"]
5126    pub RollAngleRef: f32,
5127    pub p: f32,
5128    pub pRef: f32,
5129    pub r: f32,
5130    pub rRef: f32,
5131    pub uAil: f32,
5132    pub uRud: f32,
5133    #[doc = "ASLCTRL control-mode (manual, stabilized, auto, etc...)"]
5134    pub aslctrl_mode: u8,
5135    pub SpoilersEngaged: u8,
5136}
5137impl ASLCTRL_DATA_DATA {
5138    pub const ENCODED_LEN: usize = 98usize;
5139    pub const DEFAULT: Self = Self {
5140        timestamp: 0_u64,
5141        h: 0.0_f32,
5142        hRef: 0.0_f32,
5143        hRef_t: 0.0_f32,
5144        PitchAngle: 0.0_f32,
5145        PitchAngleRef: 0.0_f32,
5146        q: 0.0_f32,
5147        qRef: 0.0_f32,
5148        uElev: 0.0_f32,
5149        uThrot: 0.0_f32,
5150        uThrot2: 0.0_f32,
5151        nZ: 0.0_f32,
5152        AirspeedRef: 0.0_f32,
5153        YawAngle: 0.0_f32,
5154        YawAngleRef: 0.0_f32,
5155        RollAngle: 0.0_f32,
5156        RollAngleRef: 0.0_f32,
5157        p: 0.0_f32,
5158        pRef: 0.0_f32,
5159        r: 0.0_f32,
5160        rRef: 0.0_f32,
5161        uAil: 0.0_f32,
5162        uRud: 0.0_f32,
5163        aslctrl_mode: 0_u8,
5164        SpoilersEngaged: 0_u8,
5165    };
5166    #[cfg(feature = "arbitrary")]
5167    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5168        use arbitrary::{Arbitrary, Unstructured};
5169        let mut buf = [0u8; 1024];
5170        rng.fill_bytes(&mut buf);
5171        let mut unstructured = Unstructured::new(&buf);
5172        Self::arbitrary(&mut unstructured).unwrap_or_default()
5173    }
5174}
5175impl Default for ASLCTRL_DATA_DATA {
5176    fn default() -> Self {
5177        Self::DEFAULT.clone()
5178    }
5179}
5180impl MessageData for ASLCTRL_DATA_DATA {
5181    type Message = MavMessage;
5182    const ID: u32 = 8004u32;
5183    const NAME: &'static str = "ASLCTRL_DATA";
5184    const EXTRA_CRC: u8 = 172u8;
5185    const ENCODED_LEN: usize = 98usize;
5186    fn deser(
5187        _version: MavlinkVersion,
5188        __input: &[u8],
5189    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5190        let avail_len = __input.len();
5191        let mut payload_buf = [0; Self::ENCODED_LEN];
5192        let mut buf = if avail_len < Self::ENCODED_LEN {
5193            payload_buf[0..avail_len].copy_from_slice(__input);
5194            Bytes::new(&payload_buf)
5195        } else {
5196            Bytes::new(__input)
5197        };
5198        let mut __struct = Self::default();
5199        __struct.timestamp = buf.get_u64_le();
5200        __struct.h = buf.get_f32_le();
5201        __struct.hRef = buf.get_f32_le();
5202        __struct.hRef_t = buf.get_f32_le();
5203        __struct.PitchAngle = buf.get_f32_le();
5204        __struct.PitchAngleRef = buf.get_f32_le();
5205        __struct.q = buf.get_f32_le();
5206        __struct.qRef = buf.get_f32_le();
5207        __struct.uElev = buf.get_f32_le();
5208        __struct.uThrot = buf.get_f32_le();
5209        __struct.uThrot2 = buf.get_f32_le();
5210        __struct.nZ = buf.get_f32_le();
5211        __struct.AirspeedRef = buf.get_f32_le();
5212        __struct.YawAngle = buf.get_f32_le();
5213        __struct.YawAngleRef = buf.get_f32_le();
5214        __struct.RollAngle = buf.get_f32_le();
5215        __struct.RollAngleRef = buf.get_f32_le();
5216        __struct.p = buf.get_f32_le();
5217        __struct.pRef = buf.get_f32_le();
5218        __struct.r = buf.get_f32_le();
5219        __struct.rRef = buf.get_f32_le();
5220        __struct.uAil = buf.get_f32_le();
5221        __struct.uRud = buf.get_f32_le();
5222        __struct.aslctrl_mode = buf.get_u8();
5223        __struct.SpoilersEngaged = buf.get_u8();
5224        Ok(__struct)
5225    }
5226    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5227        let mut __tmp = BytesMut::new(bytes);
5228        #[allow(clippy::absurd_extreme_comparisons)]
5229        #[allow(unused_comparisons)]
5230        if __tmp.remaining() < Self::ENCODED_LEN {
5231            panic!(
5232                "buffer is too small (need {} bytes, but got {})",
5233                Self::ENCODED_LEN,
5234                __tmp.remaining(),
5235            )
5236        }
5237        __tmp.put_u64_le(self.timestamp);
5238        __tmp.put_f32_le(self.h);
5239        __tmp.put_f32_le(self.hRef);
5240        __tmp.put_f32_le(self.hRef_t);
5241        __tmp.put_f32_le(self.PitchAngle);
5242        __tmp.put_f32_le(self.PitchAngleRef);
5243        __tmp.put_f32_le(self.q);
5244        __tmp.put_f32_le(self.qRef);
5245        __tmp.put_f32_le(self.uElev);
5246        __tmp.put_f32_le(self.uThrot);
5247        __tmp.put_f32_le(self.uThrot2);
5248        __tmp.put_f32_le(self.nZ);
5249        __tmp.put_f32_le(self.AirspeedRef);
5250        __tmp.put_f32_le(self.YawAngle);
5251        __tmp.put_f32_le(self.YawAngleRef);
5252        __tmp.put_f32_le(self.RollAngle);
5253        __tmp.put_f32_le(self.RollAngleRef);
5254        __tmp.put_f32_le(self.p);
5255        __tmp.put_f32_le(self.pRef);
5256        __tmp.put_f32_le(self.r);
5257        __tmp.put_f32_le(self.rRef);
5258        __tmp.put_f32_le(self.uAil);
5259        __tmp.put_f32_le(self.uRud);
5260        __tmp.put_u8(self.aslctrl_mode);
5261        __tmp.put_u8(self.SpoilersEngaged);
5262        if matches!(version, MavlinkVersion::V2) {
5263            let len = __tmp.len();
5264            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5265        } else {
5266            __tmp.len()
5267        }
5268    }
5269}
5270#[doc = "ASL-fixed-wing controller debug data."]
5271#[doc = ""]
5272#[doc = "ID: 8005"]
5273#[derive(Debug, Clone, PartialEq)]
5274#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5275#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5276pub struct ASLCTRL_DEBUG_DATA {
5277    #[doc = "Debug data"]
5278    pub i32_1: u32,
5279    #[doc = "Debug data"]
5280    pub f_1: f32,
5281    #[doc = "Debug data"]
5282    pub f_2: f32,
5283    #[doc = "Debug data"]
5284    pub f_3: f32,
5285    #[doc = "Debug data"]
5286    pub f_4: f32,
5287    #[doc = "Debug data"]
5288    pub f_5: f32,
5289    #[doc = "Debug data"]
5290    pub f_6: f32,
5291    #[doc = "Debug data"]
5292    pub f_7: f32,
5293    #[doc = "Debug data"]
5294    pub f_8: f32,
5295    #[doc = "Debug data"]
5296    pub i8_1: u8,
5297    #[doc = "Debug data"]
5298    pub i8_2: u8,
5299}
5300impl ASLCTRL_DEBUG_DATA {
5301    pub const ENCODED_LEN: usize = 38usize;
5302    pub const DEFAULT: Self = Self {
5303        i32_1: 0_u32,
5304        f_1: 0.0_f32,
5305        f_2: 0.0_f32,
5306        f_3: 0.0_f32,
5307        f_4: 0.0_f32,
5308        f_5: 0.0_f32,
5309        f_6: 0.0_f32,
5310        f_7: 0.0_f32,
5311        f_8: 0.0_f32,
5312        i8_1: 0_u8,
5313        i8_2: 0_u8,
5314    };
5315    #[cfg(feature = "arbitrary")]
5316    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5317        use arbitrary::{Arbitrary, Unstructured};
5318        let mut buf = [0u8; 1024];
5319        rng.fill_bytes(&mut buf);
5320        let mut unstructured = Unstructured::new(&buf);
5321        Self::arbitrary(&mut unstructured).unwrap_or_default()
5322    }
5323}
5324impl Default for ASLCTRL_DEBUG_DATA {
5325    fn default() -> Self {
5326        Self::DEFAULT.clone()
5327    }
5328}
5329impl MessageData for ASLCTRL_DEBUG_DATA {
5330    type Message = MavMessage;
5331    const ID: u32 = 8005u32;
5332    const NAME: &'static str = "ASLCTRL_DEBUG";
5333    const EXTRA_CRC: u8 = 251u8;
5334    const ENCODED_LEN: usize = 38usize;
5335    fn deser(
5336        _version: MavlinkVersion,
5337        __input: &[u8],
5338    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5339        let avail_len = __input.len();
5340        let mut payload_buf = [0; Self::ENCODED_LEN];
5341        let mut buf = if avail_len < Self::ENCODED_LEN {
5342            payload_buf[0..avail_len].copy_from_slice(__input);
5343            Bytes::new(&payload_buf)
5344        } else {
5345            Bytes::new(__input)
5346        };
5347        let mut __struct = Self::default();
5348        __struct.i32_1 = buf.get_u32_le();
5349        __struct.f_1 = buf.get_f32_le();
5350        __struct.f_2 = buf.get_f32_le();
5351        __struct.f_3 = buf.get_f32_le();
5352        __struct.f_4 = buf.get_f32_le();
5353        __struct.f_5 = buf.get_f32_le();
5354        __struct.f_6 = buf.get_f32_le();
5355        __struct.f_7 = buf.get_f32_le();
5356        __struct.f_8 = buf.get_f32_le();
5357        __struct.i8_1 = buf.get_u8();
5358        __struct.i8_2 = buf.get_u8();
5359        Ok(__struct)
5360    }
5361    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5362        let mut __tmp = BytesMut::new(bytes);
5363        #[allow(clippy::absurd_extreme_comparisons)]
5364        #[allow(unused_comparisons)]
5365        if __tmp.remaining() < Self::ENCODED_LEN {
5366            panic!(
5367                "buffer is too small (need {} bytes, but got {})",
5368                Self::ENCODED_LEN,
5369                __tmp.remaining(),
5370            )
5371        }
5372        __tmp.put_u32_le(self.i32_1);
5373        __tmp.put_f32_le(self.f_1);
5374        __tmp.put_f32_le(self.f_2);
5375        __tmp.put_f32_le(self.f_3);
5376        __tmp.put_f32_le(self.f_4);
5377        __tmp.put_f32_le(self.f_5);
5378        __tmp.put_f32_le(self.f_6);
5379        __tmp.put_f32_le(self.f_7);
5380        __tmp.put_f32_le(self.f_8);
5381        __tmp.put_u8(self.i8_1);
5382        __tmp.put_u8(self.i8_2);
5383        if matches!(version, MavlinkVersion::V2) {
5384            let len = __tmp.len();
5385            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5386        } else {
5387            __tmp.len()
5388        }
5389    }
5390}
5391#[doc = "Extended state information for ASLUAVs."]
5392#[doc = ""]
5393#[doc = "ID: 8006"]
5394#[derive(Debug, Clone, PartialEq)]
5395#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5396#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5397pub struct ASLUAV_STATUS_DATA {
5398    #[doc = "Motor RPM"]
5399    pub Motor_rpm: f32,
5400    #[doc = "Status of the position-indicator LEDs"]
5401    pub LED_status: u8,
5402    #[doc = "Status of the IRIDIUM satellite communication system"]
5403    pub SATCOM_status: u8,
5404    #[doc = "Status vector for up to 8 servos"]
5405    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5406    pub Servo_status: [u8; 8],
5407}
5408impl ASLUAV_STATUS_DATA {
5409    pub const ENCODED_LEN: usize = 14usize;
5410    pub const DEFAULT: Self = Self {
5411        Motor_rpm: 0.0_f32,
5412        LED_status: 0_u8,
5413        SATCOM_status: 0_u8,
5414        Servo_status: [0_u8; 8usize],
5415    };
5416    #[cfg(feature = "arbitrary")]
5417    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5418        use arbitrary::{Arbitrary, Unstructured};
5419        let mut buf = [0u8; 1024];
5420        rng.fill_bytes(&mut buf);
5421        let mut unstructured = Unstructured::new(&buf);
5422        Self::arbitrary(&mut unstructured).unwrap_or_default()
5423    }
5424}
5425impl Default for ASLUAV_STATUS_DATA {
5426    fn default() -> Self {
5427        Self::DEFAULT.clone()
5428    }
5429}
5430impl MessageData for ASLUAV_STATUS_DATA {
5431    type Message = MavMessage;
5432    const ID: u32 = 8006u32;
5433    const NAME: &'static str = "ASLUAV_STATUS";
5434    const EXTRA_CRC: u8 = 97u8;
5435    const ENCODED_LEN: usize = 14usize;
5436    fn deser(
5437        _version: MavlinkVersion,
5438        __input: &[u8],
5439    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5440        let avail_len = __input.len();
5441        let mut payload_buf = [0; Self::ENCODED_LEN];
5442        let mut buf = if avail_len < Self::ENCODED_LEN {
5443            payload_buf[0..avail_len].copy_from_slice(__input);
5444            Bytes::new(&payload_buf)
5445        } else {
5446            Bytes::new(__input)
5447        };
5448        let mut __struct = Self::default();
5449        __struct.Motor_rpm = buf.get_f32_le();
5450        __struct.LED_status = buf.get_u8();
5451        __struct.SATCOM_status = buf.get_u8();
5452        for v in &mut __struct.Servo_status {
5453            let val = buf.get_u8();
5454            *v = val;
5455        }
5456        Ok(__struct)
5457    }
5458    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5459        let mut __tmp = BytesMut::new(bytes);
5460        #[allow(clippy::absurd_extreme_comparisons)]
5461        #[allow(unused_comparisons)]
5462        if __tmp.remaining() < Self::ENCODED_LEN {
5463            panic!(
5464                "buffer is too small (need {} bytes, but got {})",
5465                Self::ENCODED_LEN,
5466                __tmp.remaining(),
5467            )
5468        }
5469        __tmp.put_f32_le(self.Motor_rpm);
5470        __tmp.put_u8(self.LED_status);
5471        __tmp.put_u8(self.SATCOM_status);
5472        for val in &self.Servo_status {
5473            __tmp.put_u8(*val);
5474        }
5475        if matches!(version, MavlinkVersion::V2) {
5476            let len = __tmp.len();
5477            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5478        } else {
5479            __tmp.len()
5480        }
5481    }
5482}
5483#[doc = "Off-board controls/commands for ASLUAVs."]
5484#[doc = ""]
5485#[doc = "ID: 8008"]
5486#[derive(Debug, Clone, PartialEq)]
5487#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5488#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5489pub struct ASL_OBCTRL_DATA {
5490    #[doc = "Time since system start"]
5491    pub timestamp: u64,
5492    #[doc = "Elevator command [~]"]
5493    pub uElev: f32,
5494    #[doc = "Throttle command [~]"]
5495    pub uThrot: f32,
5496    #[doc = "Throttle 2 command [~]"]
5497    pub uThrot2: f32,
5498    #[doc = "Left aileron command [~]"]
5499    pub uAilL: f32,
5500    #[doc = "Right aileron command [~]"]
5501    pub uAilR: f32,
5502    #[doc = "Rudder command [~]"]
5503    pub uRud: f32,
5504    #[doc = "Off-board computer status"]
5505    pub obctrl_status: u8,
5506}
5507impl ASL_OBCTRL_DATA {
5508    pub const ENCODED_LEN: usize = 33usize;
5509    pub const DEFAULT: Self = Self {
5510        timestamp: 0_u64,
5511        uElev: 0.0_f32,
5512        uThrot: 0.0_f32,
5513        uThrot2: 0.0_f32,
5514        uAilL: 0.0_f32,
5515        uAilR: 0.0_f32,
5516        uRud: 0.0_f32,
5517        obctrl_status: 0_u8,
5518    };
5519    #[cfg(feature = "arbitrary")]
5520    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5521        use arbitrary::{Arbitrary, Unstructured};
5522        let mut buf = [0u8; 1024];
5523        rng.fill_bytes(&mut buf);
5524        let mut unstructured = Unstructured::new(&buf);
5525        Self::arbitrary(&mut unstructured).unwrap_or_default()
5526    }
5527}
5528impl Default for ASL_OBCTRL_DATA {
5529    fn default() -> Self {
5530        Self::DEFAULT.clone()
5531    }
5532}
5533impl MessageData for ASL_OBCTRL_DATA {
5534    type Message = MavMessage;
5535    const ID: u32 = 8008u32;
5536    const NAME: &'static str = "ASL_OBCTRL";
5537    const EXTRA_CRC: u8 = 234u8;
5538    const ENCODED_LEN: usize = 33usize;
5539    fn deser(
5540        _version: MavlinkVersion,
5541        __input: &[u8],
5542    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5543        let avail_len = __input.len();
5544        let mut payload_buf = [0; Self::ENCODED_LEN];
5545        let mut buf = if avail_len < Self::ENCODED_LEN {
5546            payload_buf[0..avail_len].copy_from_slice(__input);
5547            Bytes::new(&payload_buf)
5548        } else {
5549            Bytes::new(__input)
5550        };
5551        let mut __struct = Self::default();
5552        __struct.timestamp = buf.get_u64_le();
5553        __struct.uElev = buf.get_f32_le();
5554        __struct.uThrot = buf.get_f32_le();
5555        __struct.uThrot2 = buf.get_f32_le();
5556        __struct.uAilL = buf.get_f32_le();
5557        __struct.uAilR = buf.get_f32_le();
5558        __struct.uRud = buf.get_f32_le();
5559        __struct.obctrl_status = buf.get_u8();
5560        Ok(__struct)
5561    }
5562    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5563        let mut __tmp = BytesMut::new(bytes);
5564        #[allow(clippy::absurd_extreme_comparisons)]
5565        #[allow(unused_comparisons)]
5566        if __tmp.remaining() < Self::ENCODED_LEN {
5567            panic!(
5568                "buffer is too small (need {} bytes, but got {})",
5569                Self::ENCODED_LEN,
5570                __tmp.remaining(),
5571            )
5572        }
5573        __tmp.put_u64_le(self.timestamp);
5574        __tmp.put_f32_le(self.uElev);
5575        __tmp.put_f32_le(self.uThrot);
5576        __tmp.put_f32_le(self.uThrot2);
5577        __tmp.put_f32_le(self.uAilL);
5578        __tmp.put_f32_le(self.uAilR);
5579        __tmp.put_f32_le(self.uRud);
5580        __tmp.put_u8(self.obctrl_status);
5581        if matches!(version, MavlinkVersion::V2) {
5582            let len = __tmp.len();
5583            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5584        } else {
5585            __tmp.len()
5586        }
5587    }
5588}
5589#[doc = "The attitude in the aeronautical frame (right-handed, Z-down, Y-right, X-front, ZYX, intrinsic)."]
5590#[doc = ""]
5591#[doc = "ID: 30"]
5592#[derive(Debug, Clone, PartialEq)]
5593#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5594#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5595pub struct ATTITUDE_DATA {
5596    #[doc = "Timestamp (time since system boot)."]
5597    pub time_boot_ms: u32,
5598    #[doc = "Roll angle (-pi..+pi)"]
5599    pub roll: f32,
5600    #[doc = "Pitch angle (-pi..+pi)"]
5601    pub pitch: f32,
5602    #[doc = "Yaw angle (-pi..+pi)"]
5603    pub yaw: f32,
5604    #[doc = "Roll angular speed"]
5605    pub rollspeed: f32,
5606    #[doc = "Pitch angular speed"]
5607    pub pitchspeed: f32,
5608    #[doc = "Yaw angular speed"]
5609    pub yawspeed: f32,
5610}
5611impl ATTITUDE_DATA {
5612    pub const ENCODED_LEN: usize = 28usize;
5613    pub const DEFAULT: Self = Self {
5614        time_boot_ms: 0_u32,
5615        roll: 0.0_f32,
5616        pitch: 0.0_f32,
5617        yaw: 0.0_f32,
5618        rollspeed: 0.0_f32,
5619        pitchspeed: 0.0_f32,
5620        yawspeed: 0.0_f32,
5621    };
5622    #[cfg(feature = "arbitrary")]
5623    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5624        use arbitrary::{Arbitrary, Unstructured};
5625        let mut buf = [0u8; 1024];
5626        rng.fill_bytes(&mut buf);
5627        let mut unstructured = Unstructured::new(&buf);
5628        Self::arbitrary(&mut unstructured).unwrap_or_default()
5629    }
5630}
5631impl Default for ATTITUDE_DATA {
5632    fn default() -> Self {
5633        Self::DEFAULT.clone()
5634    }
5635}
5636impl MessageData for ATTITUDE_DATA {
5637    type Message = MavMessage;
5638    const ID: u32 = 30u32;
5639    const NAME: &'static str = "ATTITUDE";
5640    const EXTRA_CRC: u8 = 39u8;
5641    const ENCODED_LEN: usize = 28usize;
5642    fn deser(
5643        _version: MavlinkVersion,
5644        __input: &[u8],
5645    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5646        let avail_len = __input.len();
5647        let mut payload_buf = [0; Self::ENCODED_LEN];
5648        let mut buf = if avail_len < Self::ENCODED_LEN {
5649            payload_buf[0..avail_len].copy_from_slice(__input);
5650            Bytes::new(&payload_buf)
5651        } else {
5652            Bytes::new(__input)
5653        };
5654        let mut __struct = Self::default();
5655        __struct.time_boot_ms = buf.get_u32_le();
5656        __struct.roll = buf.get_f32_le();
5657        __struct.pitch = buf.get_f32_le();
5658        __struct.yaw = buf.get_f32_le();
5659        __struct.rollspeed = buf.get_f32_le();
5660        __struct.pitchspeed = buf.get_f32_le();
5661        __struct.yawspeed = buf.get_f32_le();
5662        Ok(__struct)
5663    }
5664    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5665        let mut __tmp = BytesMut::new(bytes);
5666        #[allow(clippy::absurd_extreme_comparisons)]
5667        #[allow(unused_comparisons)]
5668        if __tmp.remaining() < Self::ENCODED_LEN {
5669            panic!(
5670                "buffer is too small (need {} bytes, but got {})",
5671                Self::ENCODED_LEN,
5672                __tmp.remaining(),
5673            )
5674        }
5675        __tmp.put_u32_le(self.time_boot_ms);
5676        __tmp.put_f32_le(self.roll);
5677        __tmp.put_f32_le(self.pitch);
5678        __tmp.put_f32_le(self.yaw);
5679        __tmp.put_f32_le(self.rollspeed);
5680        __tmp.put_f32_le(self.pitchspeed);
5681        __tmp.put_f32_le(self.yawspeed);
5682        if matches!(version, MavlinkVersion::V2) {
5683            let len = __tmp.len();
5684            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5685        } else {
5686            __tmp.len()
5687        }
5688    }
5689}
5690#[doc = "The attitude in the aeronautical frame (right-handed, Z-down, X-front, Y-right), expressed as quaternion. Quaternion order is w, x, y, z and a zero rotation would be expressed as (1 0 0 0)."]
5691#[doc = ""]
5692#[doc = "ID: 31"]
5693#[derive(Debug, Clone, PartialEq)]
5694#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5695#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5696pub struct ATTITUDE_QUATERNION_DATA {
5697    #[doc = "Timestamp (time since system boot)."]
5698    pub time_boot_ms: u32,
5699    #[doc = "Quaternion component 1, w (1 in null-rotation)"]
5700    pub q1: f32,
5701    #[doc = "Quaternion component 2, x (0 in null-rotation)"]
5702    pub q2: f32,
5703    #[doc = "Quaternion component 3, y (0 in null-rotation)"]
5704    pub q3: f32,
5705    #[doc = "Quaternion component 4, z (0 in null-rotation)"]
5706    pub q4: f32,
5707    #[doc = "Roll angular speed"]
5708    pub rollspeed: f32,
5709    #[doc = "Pitch angular speed"]
5710    pub pitchspeed: f32,
5711    #[doc = "Yaw angular speed"]
5712    pub yawspeed: f32,
5713    #[doc = "Rotation offset by which the attitude quaternion and angular speed vector should be rotated for user display (quaternion with [w, x, y, z] order, zero-rotation is [1, 0, 0, 0], send [0, 0, 0, 0] if field not supported). This field is intended for systems in which the reference attitude may change during flight. For example, tailsitters VTOLs rotate their reference attitude by 90 degrees between hover mode and fixed wing mode, thus repr_offset_q is equal to [1, 0, 0, 0] in hover mode and equal to [0.7071, 0, 0.7071, 0] in fixed wing mode."]
5714    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
5715    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5716    pub repr_offset_q: [f32; 4],
5717}
5718impl ATTITUDE_QUATERNION_DATA {
5719    pub const ENCODED_LEN: usize = 48usize;
5720    pub const DEFAULT: Self = Self {
5721        time_boot_ms: 0_u32,
5722        q1: 0.0_f32,
5723        q2: 0.0_f32,
5724        q3: 0.0_f32,
5725        q4: 0.0_f32,
5726        rollspeed: 0.0_f32,
5727        pitchspeed: 0.0_f32,
5728        yawspeed: 0.0_f32,
5729        repr_offset_q: [0.0_f32; 4usize],
5730    };
5731    #[cfg(feature = "arbitrary")]
5732    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5733        use arbitrary::{Arbitrary, Unstructured};
5734        let mut buf = [0u8; 1024];
5735        rng.fill_bytes(&mut buf);
5736        let mut unstructured = Unstructured::new(&buf);
5737        Self::arbitrary(&mut unstructured).unwrap_or_default()
5738    }
5739}
5740impl Default for ATTITUDE_QUATERNION_DATA {
5741    fn default() -> Self {
5742        Self::DEFAULT.clone()
5743    }
5744}
5745impl MessageData for ATTITUDE_QUATERNION_DATA {
5746    type Message = MavMessage;
5747    const ID: u32 = 31u32;
5748    const NAME: &'static str = "ATTITUDE_QUATERNION";
5749    const EXTRA_CRC: u8 = 246u8;
5750    const ENCODED_LEN: usize = 48usize;
5751    fn deser(
5752        _version: MavlinkVersion,
5753        __input: &[u8],
5754    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5755        let avail_len = __input.len();
5756        let mut payload_buf = [0; Self::ENCODED_LEN];
5757        let mut buf = if avail_len < Self::ENCODED_LEN {
5758            payload_buf[0..avail_len].copy_from_slice(__input);
5759            Bytes::new(&payload_buf)
5760        } else {
5761            Bytes::new(__input)
5762        };
5763        let mut __struct = Self::default();
5764        __struct.time_boot_ms = buf.get_u32_le();
5765        __struct.q1 = buf.get_f32_le();
5766        __struct.q2 = buf.get_f32_le();
5767        __struct.q3 = buf.get_f32_le();
5768        __struct.q4 = buf.get_f32_le();
5769        __struct.rollspeed = buf.get_f32_le();
5770        __struct.pitchspeed = buf.get_f32_le();
5771        __struct.yawspeed = buf.get_f32_le();
5772        for v in &mut __struct.repr_offset_q {
5773            let val = buf.get_f32_le();
5774            *v = val;
5775        }
5776        Ok(__struct)
5777    }
5778    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5779        let mut __tmp = BytesMut::new(bytes);
5780        #[allow(clippy::absurd_extreme_comparisons)]
5781        #[allow(unused_comparisons)]
5782        if __tmp.remaining() < Self::ENCODED_LEN {
5783            panic!(
5784                "buffer is too small (need {} bytes, but got {})",
5785                Self::ENCODED_LEN,
5786                __tmp.remaining(),
5787            )
5788        }
5789        __tmp.put_u32_le(self.time_boot_ms);
5790        __tmp.put_f32_le(self.q1);
5791        __tmp.put_f32_le(self.q2);
5792        __tmp.put_f32_le(self.q3);
5793        __tmp.put_f32_le(self.q4);
5794        __tmp.put_f32_le(self.rollspeed);
5795        __tmp.put_f32_le(self.pitchspeed);
5796        __tmp.put_f32_le(self.yawspeed);
5797        if matches!(version, MavlinkVersion::V2) {
5798            for val in &self.repr_offset_q {
5799                __tmp.put_f32_le(*val);
5800            }
5801            let len = __tmp.len();
5802            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5803        } else {
5804            __tmp.len()
5805        }
5806    }
5807}
5808#[doc = "The attitude in the aeronautical frame (right-handed, Z-down, X-front, Y-right), expressed as quaternion. Quaternion order is w, x, y, z and a zero rotation would be expressed as (1 0 0 0)."]
5809#[doc = ""]
5810#[doc = "ID: 61"]
5811#[derive(Debug, Clone, PartialEq)]
5812#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5813#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5814pub struct ATTITUDE_QUATERNION_COV_DATA {
5815    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
5816    pub time_usec: u64,
5817    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation)"]
5818    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5819    pub q: [f32; 4],
5820    #[doc = "Roll angular speed"]
5821    pub rollspeed: f32,
5822    #[doc = "Pitch angular speed"]
5823    pub pitchspeed: f32,
5824    #[doc = "Yaw angular speed"]
5825    pub yawspeed: f32,
5826    #[doc = "Row-major representation of a 3x3 attitude covariance matrix (states: roll, pitch, yaw; first three entries are the first ROW, next three entries are the second row, etc.). If unknown, assign NaN value to first element in the array."]
5827    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5828    pub covariance: [f32; 9],
5829}
5830impl ATTITUDE_QUATERNION_COV_DATA {
5831    pub const ENCODED_LEN: usize = 72usize;
5832    pub const DEFAULT: Self = Self {
5833        time_usec: 0_u64,
5834        q: [0.0_f32; 4usize],
5835        rollspeed: 0.0_f32,
5836        pitchspeed: 0.0_f32,
5837        yawspeed: 0.0_f32,
5838        covariance: [0.0_f32; 9usize],
5839    };
5840    #[cfg(feature = "arbitrary")]
5841    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5842        use arbitrary::{Arbitrary, Unstructured};
5843        let mut buf = [0u8; 1024];
5844        rng.fill_bytes(&mut buf);
5845        let mut unstructured = Unstructured::new(&buf);
5846        Self::arbitrary(&mut unstructured).unwrap_or_default()
5847    }
5848}
5849impl Default for ATTITUDE_QUATERNION_COV_DATA {
5850    fn default() -> Self {
5851        Self::DEFAULT.clone()
5852    }
5853}
5854impl MessageData for ATTITUDE_QUATERNION_COV_DATA {
5855    type Message = MavMessage;
5856    const ID: u32 = 61u32;
5857    const NAME: &'static str = "ATTITUDE_QUATERNION_COV";
5858    const EXTRA_CRC: u8 = 167u8;
5859    const ENCODED_LEN: usize = 72usize;
5860    fn deser(
5861        _version: MavlinkVersion,
5862        __input: &[u8],
5863    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5864        let avail_len = __input.len();
5865        let mut payload_buf = [0; Self::ENCODED_LEN];
5866        let mut buf = if avail_len < Self::ENCODED_LEN {
5867            payload_buf[0..avail_len].copy_from_slice(__input);
5868            Bytes::new(&payload_buf)
5869        } else {
5870            Bytes::new(__input)
5871        };
5872        let mut __struct = Self::default();
5873        __struct.time_usec = buf.get_u64_le();
5874        for v in &mut __struct.q {
5875            let val = buf.get_f32_le();
5876            *v = val;
5877        }
5878        __struct.rollspeed = buf.get_f32_le();
5879        __struct.pitchspeed = buf.get_f32_le();
5880        __struct.yawspeed = buf.get_f32_le();
5881        for v in &mut __struct.covariance {
5882            let val = buf.get_f32_le();
5883            *v = val;
5884        }
5885        Ok(__struct)
5886    }
5887    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5888        let mut __tmp = BytesMut::new(bytes);
5889        #[allow(clippy::absurd_extreme_comparisons)]
5890        #[allow(unused_comparisons)]
5891        if __tmp.remaining() < Self::ENCODED_LEN {
5892            panic!(
5893                "buffer is too small (need {} bytes, but got {})",
5894                Self::ENCODED_LEN,
5895                __tmp.remaining(),
5896            )
5897        }
5898        __tmp.put_u64_le(self.time_usec);
5899        for val in &self.q {
5900            __tmp.put_f32_le(*val);
5901        }
5902        __tmp.put_f32_le(self.rollspeed);
5903        __tmp.put_f32_le(self.pitchspeed);
5904        __tmp.put_f32_le(self.yawspeed);
5905        for val in &self.covariance {
5906            __tmp.put_f32_le(*val);
5907        }
5908        if matches!(version, MavlinkVersion::V2) {
5909            let len = __tmp.len();
5910            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5911        } else {
5912            __tmp.len()
5913        }
5914    }
5915}
5916#[doc = "Reports the current commanded attitude of the vehicle as specified by the autopilot. This should match the commands sent in a SET_ATTITUDE_TARGET message if the vehicle is being controlled this way."]
5917#[doc = ""]
5918#[doc = "ID: 83"]
5919#[derive(Debug, Clone, PartialEq)]
5920#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5921#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5922pub struct ATTITUDE_TARGET_DATA {
5923    #[doc = "Timestamp (time since system boot)."]
5924    pub time_boot_ms: u32,
5925    #[doc = "Attitude quaternion (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
5926    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5927    pub q: [f32; 4],
5928    #[doc = "Body roll rate"]
5929    pub body_roll_rate: f32,
5930    #[doc = "Body pitch rate"]
5931    pub body_pitch_rate: f32,
5932    #[doc = "Body yaw rate"]
5933    pub body_yaw_rate: f32,
5934    #[doc = "Collective thrust, normalized to 0 .. 1 (-1 .. 1 for vehicles capable of reverse trust)"]
5935    pub thrust: f32,
5936    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
5937    pub type_mask: AttitudeTargetTypemask,
5938}
5939impl ATTITUDE_TARGET_DATA {
5940    pub const ENCODED_LEN: usize = 37usize;
5941    pub const DEFAULT: Self = Self {
5942        time_boot_ms: 0_u32,
5943        q: [0.0_f32; 4usize],
5944        body_roll_rate: 0.0_f32,
5945        body_pitch_rate: 0.0_f32,
5946        body_yaw_rate: 0.0_f32,
5947        thrust: 0.0_f32,
5948        type_mask: AttitudeTargetTypemask::DEFAULT,
5949    };
5950    #[cfg(feature = "arbitrary")]
5951    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5952        use arbitrary::{Arbitrary, Unstructured};
5953        let mut buf = [0u8; 1024];
5954        rng.fill_bytes(&mut buf);
5955        let mut unstructured = Unstructured::new(&buf);
5956        Self::arbitrary(&mut unstructured).unwrap_or_default()
5957    }
5958}
5959impl Default for ATTITUDE_TARGET_DATA {
5960    fn default() -> Self {
5961        Self::DEFAULT.clone()
5962    }
5963}
5964impl MessageData for ATTITUDE_TARGET_DATA {
5965    type Message = MavMessage;
5966    const ID: u32 = 83u32;
5967    const NAME: &'static str = "ATTITUDE_TARGET";
5968    const EXTRA_CRC: u8 = 22u8;
5969    const ENCODED_LEN: usize = 37usize;
5970    fn deser(
5971        _version: MavlinkVersion,
5972        __input: &[u8],
5973    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5974        let avail_len = __input.len();
5975        let mut payload_buf = [0; Self::ENCODED_LEN];
5976        let mut buf = if avail_len < Self::ENCODED_LEN {
5977            payload_buf[0..avail_len].copy_from_slice(__input);
5978            Bytes::new(&payload_buf)
5979        } else {
5980            Bytes::new(__input)
5981        };
5982        let mut __struct = Self::default();
5983        __struct.time_boot_ms = buf.get_u32_le();
5984        for v in &mut __struct.q {
5985            let val = buf.get_f32_le();
5986            *v = val;
5987        }
5988        __struct.body_roll_rate = buf.get_f32_le();
5989        __struct.body_pitch_rate = buf.get_f32_le();
5990        __struct.body_yaw_rate = buf.get_f32_le();
5991        __struct.thrust = buf.get_f32_le();
5992        let tmp = buf.get_u8();
5993        __struct.type_mask = AttitudeTargetTypemask::from_bits(
5994            tmp & AttitudeTargetTypemask::all().bits(),
5995        )
5996        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
5997            flag_type: "AttitudeTargetTypemask",
5998            value: tmp as u32,
5999        })?;
6000        Ok(__struct)
6001    }
6002    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6003        let mut __tmp = BytesMut::new(bytes);
6004        #[allow(clippy::absurd_extreme_comparisons)]
6005        #[allow(unused_comparisons)]
6006        if __tmp.remaining() < Self::ENCODED_LEN {
6007            panic!(
6008                "buffer is too small (need {} bytes, but got {})",
6009                Self::ENCODED_LEN,
6010                __tmp.remaining(),
6011            )
6012        }
6013        __tmp.put_u32_le(self.time_boot_ms);
6014        for val in &self.q {
6015            __tmp.put_f32_le(*val);
6016        }
6017        __tmp.put_f32_le(self.body_roll_rate);
6018        __tmp.put_f32_le(self.body_pitch_rate);
6019        __tmp.put_f32_le(self.body_yaw_rate);
6020        __tmp.put_f32_le(self.thrust);
6021        __tmp.put_u8(self.type_mask.bits());
6022        if matches!(version, MavlinkVersion::V2) {
6023            let len = __tmp.len();
6024            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6025        } else {
6026            __tmp.len()
6027        }
6028    }
6029}
6030#[doc = "Motion capture attitude and position."]
6031#[doc = ""]
6032#[doc = "ID: 138"]
6033#[derive(Debug, Clone, PartialEq)]
6034#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6035#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6036pub struct ATT_POS_MOCAP_DATA {
6037    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
6038    pub time_usec: u64,
6039    #[doc = "Attitude quaternion (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
6040    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6041    pub q: [f32; 4],
6042    #[doc = "X position (NED)"]
6043    pub x: f32,
6044    #[doc = "Y position (NED)"]
6045    pub y: f32,
6046    #[doc = "Z position (NED)"]
6047    pub z: f32,
6048    #[doc = "Row-major representation of a pose 6x6 cross-covariance matrix upper right triangle (states: x, y, z, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
6049    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
6050    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6051    pub covariance: [f32; 21],
6052}
6053impl ATT_POS_MOCAP_DATA {
6054    pub const ENCODED_LEN: usize = 120usize;
6055    pub const DEFAULT: Self = Self {
6056        time_usec: 0_u64,
6057        q: [0.0_f32; 4usize],
6058        x: 0.0_f32,
6059        y: 0.0_f32,
6060        z: 0.0_f32,
6061        covariance: [0.0_f32; 21usize],
6062    };
6063    #[cfg(feature = "arbitrary")]
6064    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6065        use arbitrary::{Arbitrary, Unstructured};
6066        let mut buf = [0u8; 1024];
6067        rng.fill_bytes(&mut buf);
6068        let mut unstructured = Unstructured::new(&buf);
6069        Self::arbitrary(&mut unstructured).unwrap_or_default()
6070    }
6071}
6072impl Default for ATT_POS_MOCAP_DATA {
6073    fn default() -> Self {
6074        Self::DEFAULT.clone()
6075    }
6076}
6077impl MessageData for ATT_POS_MOCAP_DATA {
6078    type Message = MavMessage;
6079    const ID: u32 = 138u32;
6080    const NAME: &'static str = "ATT_POS_MOCAP";
6081    const EXTRA_CRC: u8 = 109u8;
6082    const ENCODED_LEN: usize = 120usize;
6083    fn deser(
6084        _version: MavlinkVersion,
6085        __input: &[u8],
6086    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6087        let avail_len = __input.len();
6088        let mut payload_buf = [0; Self::ENCODED_LEN];
6089        let mut buf = if avail_len < Self::ENCODED_LEN {
6090            payload_buf[0..avail_len].copy_from_slice(__input);
6091            Bytes::new(&payload_buf)
6092        } else {
6093            Bytes::new(__input)
6094        };
6095        let mut __struct = Self::default();
6096        __struct.time_usec = buf.get_u64_le();
6097        for v in &mut __struct.q {
6098            let val = buf.get_f32_le();
6099            *v = val;
6100        }
6101        __struct.x = buf.get_f32_le();
6102        __struct.y = buf.get_f32_le();
6103        __struct.z = buf.get_f32_le();
6104        for v in &mut __struct.covariance {
6105            let val = buf.get_f32_le();
6106            *v = val;
6107        }
6108        Ok(__struct)
6109    }
6110    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6111        let mut __tmp = BytesMut::new(bytes);
6112        #[allow(clippy::absurd_extreme_comparisons)]
6113        #[allow(unused_comparisons)]
6114        if __tmp.remaining() < Self::ENCODED_LEN {
6115            panic!(
6116                "buffer is too small (need {} bytes, but got {})",
6117                Self::ENCODED_LEN,
6118                __tmp.remaining(),
6119            )
6120        }
6121        __tmp.put_u64_le(self.time_usec);
6122        for val in &self.q {
6123            __tmp.put_f32_le(*val);
6124        }
6125        __tmp.put_f32_le(self.x);
6126        __tmp.put_f32_le(self.y);
6127        __tmp.put_f32_le(self.z);
6128        if matches!(version, MavlinkVersion::V2) {
6129            for val in &self.covariance {
6130                __tmp.put_f32_le(*val);
6131            }
6132            let len = __tmp.len();
6133            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6134        } else {
6135            __tmp.len()
6136        }
6137    }
6138}
6139#[doc = "Emit an encrypted signature / key identifying this system. PLEASE NOTE: This protocol has been kept simple, so transmitting the key requires an encrypted channel for true safety."]
6140#[doc = ""]
6141#[doc = "ID: 7"]
6142#[derive(Debug, Clone, PartialEq)]
6143#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6144#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6145pub struct AUTH_KEY_DATA {
6146    #[doc = "key"]
6147    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6148    pub key: [u8; 32],
6149}
6150impl AUTH_KEY_DATA {
6151    pub const ENCODED_LEN: usize = 32usize;
6152    pub const DEFAULT: Self = Self {
6153        key: [0_u8; 32usize],
6154    };
6155    #[cfg(feature = "arbitrary")]
6156    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6157        use arbitrary::{Arbitrary, Unstructured};
6158        let mut buf = [0u8; 1024];
6159        rng.fill_bytes(&mut buf);
6160        let mut unstructured = Unstructured::new(&buf);
6161        Self::arbitrary(&mut unstructured).unwrap_or_default()
6162    }
6163}
6164impl Default for AUTH_KEY_DATA {
6165    fn default() -> Self {
6166        Self::DEFAULT.clone()
6167    }
6168}
6169impl MessageData for AUTH_KEY_DATA {
6170    type Message = MavMessage;
6171    const ID: u32 = 7u32;
6172    const NAME: &'static str = "AUTH_KEY";
6173    const EXTRA_CRC: u8 = 119u8;
6174    const ENCODED_LEN: usize = 32usize;
6175    fn deser(
6176        _version: MavlinkVersion,
6177        __input: &[u8],
6178    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6179        let avail_len = __input.len();
6180        let mut payload_buf = [0; Self::ENCODED_LEN];
6181        let mut buf = if avail_len < Self::ENCODED_LEN {
6182            payload_buf[0..avail_len].copy_from_slice(__input);
6183            Bytes::new(&payload_buf)
6184        } else {
6185            Bytes::new(__input)
6186        };
6187        let mut __struct = Self::default();
6188        for v in &mut __struct.key {
6189            let val = buf.get_u8();
6190            *v = val;
6191        }
6192        Ok(__struct)
6193    }
6194    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6195        let mut __tmp = BytesMut::new(bytes);
6196        #[allow(clippy::absurd_extreme_comparisons)]
6197        #[allow(unused_comparisons)]
6198        if __tmp.remaining() < Self::ENCODED_LEN {
6199            panic!(
6200                "buffer is too small (need {} bytes, but got {})",
6201                Self::ENCODED_LEN,
6202                __tmp.remaining(),
6203            )
6204        }
6205        for val in &self.key {
6206            __tmp.put_u8(*val);
6207        }
6208        if matches!(version, MavlinkVersion::V2) {
6209            let len = __tmp.len();
6210            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6211        } else {
6212            __tmp.len()
6213        }
6214    }
6215}
6216#[doc = "Low level message containing autopilot state relevant for a gimbal device. This message is to be sent from the autopilot to the gimbal device component. The data of this message are for the gimbal device's estimator corrections, in particular horizon compensation, as well as indicates autopilot control intentions, e.g. feed forward angular control in the z-axis."]
6217#[doc = ""]
6218#[doc = "ID: 286"]
6219#[derive(Debug, Clone, PartialEq)]
6220#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6221#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6222pub struct AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA {
6223    #[doc = "Timestamp (time since system boot)."]
6224    pub time_boot_us: u64,
6225    #[doc = "Quaternion components of autopilot attitude: w, x, y, z (1 0 0 0 is the null-rotation, Hamilton convention)."]
6226    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6227    pub q: [f32; 4],
6228    #[doc = "Estimated delay of the attitude data. 0 if unknown."]
6229    pub q_estimated_delay_us: u32,
6230    #[doc = "X Speed in NED (North, East, Down). NAN if unknown."]
6231    pub vx: f32,
6232    #[doc = "Y Speed in NED (North, East, Down). NAN if unknown."]
6233    pub vy: f32,
6234    #[doc = "Z Speed in NED (North, East, Down). NAN if unknown."]
6235    pub vz: f32,
6236    #[doc = "Estimated delay of the speed data. 0 if unknown."]
6237    pub v_estimated_delay_us: u32,
6238    #[doc = "Feed forward Z component of angular velocity (positive: yawing to the right). NaN to be ignored. This is to indicate if the autopilot is actively yawing."]
6239    pub feed_forward_angular_velocity_z: f32,
6240    #[doc = "Bitmap indicating which estimator outputs are valid."]
6241    pub estimator_status: EstimatorStatusFlags,
6242    #[doc = "System ID"]
6243    pub target_system: u8,
6244    #[doc = "Component ID"]
6245    pub target_component: u8,
6246    #[doc = "The landed state. Is set to MAV_LANDED_STATE_UNDEFINED if landed state is unknown."]
6247    pub landed_state: MavLandedState,
6248    #[doc = "Z component of angular velocity in NED (North, East, Down). NaN if unknown."]
6249    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
6250    pub angular_velocity_z: f32,
6251}
6252impl AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA {
6253    pub const ENCODED_LEN: usize = 57usize;
6254    pub const DEFAULT: Self = Self {
6255        time_boot_us: 0_u64,
6256        q: [0.0_f32; 4usize],
6257        q_estimated_delay_us: 0_u32,
6258        vx: 0.0_f32,
6259        vy: 0.0_f32,
6260        vz: 0.0_f32,
6261        v_estimated_delay_us: 0_u32,
6262        feed_forward_angular_velocity_z: 0.0_f32,
6263        estimator_status: EstimatorStatusFlags::DEFAULT,
6264        target_system: 0_u8,
6265        target_component: 0_u8,
6266        landed_state: MavLandedState::DEFAULT,
6267        angular_velocity_z: 0.0_f32,
6268    };
6269    #[cfg(feature = "arbitrary")]
6270    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6271        use arbitrary::{Arbitrary, Unstructured};
6272        let mut buf = [0u8; 1024];
6273        rng.fill_bytes(&mut buf);
6274        let mut unstructured = Unstructured::new(&buf);
6275        Self::arbitrary(&mut unstructured).unwrap_or_default()
6276    }
6277}
6278impl Default for AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA {
6279    fn default() -> Self {
6280        Self::DEFAULT.clone()
6281    }
6282}
6283impl MessageData for AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA {
6284    type Message = MavMessage;
6285    const ID: u32 = 286u32;
6286    const NAME: &'static str = "AUTOPILOT_STATE_FOR_GIMBAL_DEVICE";
6287    const EXTRA_CRC: u8 = 210u8;
6288    const ENCODED_LEN: usize = 57usize;
6289    fn deser(
6290        _version: MavlinkVersion,
6291        __input: &[u8],
6292    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6293        let avail_len = __input.len();
6294        let mut payload_buf = [0; Self::ENCODED_LEN];
6295        let mut buf = if avail_len < Self::ENCODED_LEN {
6296            payload_buf[0..avail_len].copy_from_slice(__input);
6297            Bytes::new(&payload_buf)
6298        } else {
6299            Bytes::new(__input)
6300        };
6301        let mut __struct = Self::default();
6302        __struct.time_boot_us = buf.get_u64_le();
6303        for v in &mut __struct.q {
6304            let val = buf.get_f32_le();
6305            *v = val;
6306        }
6307        __struct.q_estimated_delay_us = buf.get_u32_le();
6308        __struct.vx = buf.get_f32_le();
6309        __struct.vy = buf.get_f32_le();
6310        __struct.vz = buf.get_f32_le();
6311        __struct.v_estimated_delay_us = buf.get_u32_le();
6312        __struct.feed_forward_angular_velocity_z = buf.get_f32_le();
6313        let tmp = buf.get_u16_le();
6314        __struct.estimator_status = EstimatorStatusFlags::from_bits(
6315            tmp & EstimatorStatusFlags::all().bits(),
6316        )
6317        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
6318            flag_type: "EstimatorStatusFlags",
6319            value: tmp as u32,
6320        })?;
6321        __struct.target_system = buf.get_u8();
6322        __struct.target_component = buf.get_u8();
6323        let tmp = buf.get_u8();
6324        __struct.landed_state =
6325            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6326                enum_type: "MavLandedState",
6327                value: tmp as u32,
6328            })?;
6329        __struct.angular_velocity_z = buf.get_f32_le();
6330        Ok(__struct)
6331    }
6332    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6333        let mut __tmp = BytesMut::new(bytes);
6334        #[allow(clippy::absurd_extreme_comparisons)]
6335        #[allow(unused_comparisons)]
6336        if __tmp.remaining() < Self::ENCODED_LEN {
6337            panic!(
6338                "buffer is too small (need {} bytes, but got {})",
6339                Self::ENCODED_LEN,
6340                __tmp.remaining(),
6341            )
6342        }
6343        __tmp.put_u64_le(self.time_boot_us);
6344        for val in &self.q {
6345            __tmp.put_f32_le(*val);
6346        }
6347        __tmp.put_u32_le(self.q_estimated_delay_us);
6348        __tmp.put_f32_le(self.vx);
6349        __tmp.put_f32_le(self.vy);
6350        __tmp.put_f32_le(self.vz);
6351        __tmp.put_u32_le(self.v_estimated_delay_us);
6352        __tmp.put_f32_le(self.feed_forward_angular_velocity_z);
6353        __tmp.put_u16_le(self.estimator_status.bits());
6354        __tmp.put_u8(self.target_system);
6355        __tmp.put_u8(self.target_component);
6356        __tmp.put_u8(self.landed_state as u8);
6357        if matches!(version, MavlinkVersion::V2) {
6358            __tmp.put_f32_le(self.angular_velocity_z);
6359            let len = __tmp.len();
6360            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6361        } else {
6362            __tmp.len()
6363        }
6364    }
6365}
6366#[doc = "Version and capability of autopilot software. This should be emitted in response to a request with MAV_CMD_REQUEST_MESSAGE."]
6367#[doc = ""]
6368#[doc = "ID: 148"]
6369#[derive(Debug, Clone, PartialEq)]
6370#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6371#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6372pub struct AUTOPILOT_VERSION_DATA {
6373    #[doc = "Bitmap of capabilities"]
6374    pub capabilities: MavProtocolCapability,
6375    #[doc = "UID if provided by hardware (see uid2)"]
6376    pub uid: u64,
6377    #[doc = "Firmware version number.         The field must be encoded as 4 bytes, where each byte (shown from MSB to LSB) is part of a semantic version: (major) (minor) (patch) (FIRMWARE_VERSION_TYPE)."]
6378    pub flight_sw_version: u32,
6379    #[doc = "Middleware version number"]
6380    pub middleware_sw_version: u32,
6381    #[doc = "Operating system version number"]
6382    pub os_sw_version: u32,
6383    #[doc = "HW / board version (last 8 bits should be silicon ID, if any). The first 16 bits of this field specify <https://github.com/PX4/PX4-Bootloader/blob/master/board_types.txt>"]
6384    pub board_version: u32,
6385    #[doc = "ID of the board vendor"]
6386    pub vendor_id: u16,
6387    #[doc = "ID of the product"]
6388    pub product_id: u16,
6389    #[doc = "Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases."]
6390    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6391    pub flight_custom_version: [u8; 8],
6392    #[doc = "Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases."]
6393    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6394    pub middleware_custom_version: [u8; 8],
6395    #[doc = "Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases."]
6396    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6397    pub os_custom_version: [u8; 8],
6398    #[doc = "UID if provided by hardware (supersedes the uid field. If this is non-zero, use this field, otherwise use uid)"]
6399    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
6400    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6401    pub uid2: [u8; 18],
6402}
6403impl AUTOPILOT_VERSION_DATA {
6404    pub const ENCODED_LEN: usize = 78usize;
6405    pub const DEFAULT: Self = Self {
6406        capabilities: MavProtocolCapability::DEFAULT,
6407        uid: 0_u64,
6408        flight_sw_version: 0_u32,
6409        middleware_sw_version: 0_u32,
6410        os_sw_version: 0_u32,
6411        board_version: 0_u32,
6412        vendor_id: 0_u16,
6413        product_id: 0_u16,
6414        flight_custom_version: [0_u8; 8usize],
6415        middleware_custom_version: [0_u8; 8usize],
6416        os_custom_version: [0_u8; 8usize],
6417        uid2: [0_u8; 18usize],
6418    };
6419    #[cfg(feature = "arbitrary")]
6420    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6421        use arbitrary::{Arbitrary, Unstructured};
6422        let mut buf = [0u8; 1024];
6423        rng.fill_bytes(&mut buf);
6424        let mut unstructured = Unstructured::new(&buf);
6425        Self::arbitrary(&mut unstructured).unwrap_or_default()
6426    }
6427}
6428impl Default for AUTOPILOT_VERSION_DATA {
6429    fn default() -> Self {
6430        Self::DEFAULT.clone()
6431    }
6432}
6433impl MessageData for AUTOPILOT_VERSION_DATA {
6434    type Message = MavMessage;
6435    const ID: u32 = 148u32;
6436    const NAME: &'static str = "AUTOPILOT_VERSION";
6437    const EXTRA_CRC: u8 = 178u8;
6438    const ENCODED_LEN: usize = 78usize;
6439    fn deser(
6440        _version: MavlinkVersion,
6441        __input: &[u8],
6442    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6443        let avail_len = __input.len();
6444        let mut payload_buf = [0; Self::ENCODED_LEN];
6445        let mut buf = if avail_len < Self::ENCODED_LEN {
6446            payload_buf[0..avail_len].copy_from_slice(__input);
6447            Bytes::new(&payload_buf)
6448        } else {
6449            Bytes::new(__input)
6450        };
6451        let mut __struct = Self::default();
6452        let tmp = buf.get_u64_le();
6453        __struct.capabilities = MavProtocolCapability::from_bits(
6454            tmp & MavProtocolCapability::all().bits(),
6455        )
6456        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
6457            flag_type: "MavProtocolCapability",
6458            value: tmp as u32,
6459        })?;
6460        __struct.uid = buf.get_u64_le();
6461        __struct.flight_sw_version = buf.get_u32_le();
6462        __struct.middleware_sw_version = buf.get_u32_le();
6463        __struct.os_sw_version = buf.get_u32_le();
6464        __struct.board_version = buf.get_u32_le();
6465        __struct.vendor_id = buf.get_u16_le();
6466        __struct.product_id = buf.get_u16_le();
6467        for v in &mut __struct.flight_custom_version {
6468            let val = buf.get_u8();
6469            *v = val;
6470        }
6471        for v in &mut __struct.middleware_custom_version {
6472            let val = buf.get_u8();
6473            *v = val;
6474        }
6475        for v in &mut __struct.os_custom_version {
6476            let val = buf.get_u8();
6477            *v = val;
6478        }
6479        for v in &mut __struct.uid2 {
6480            let val = buf.get_u8();
6481            *v = val;
6482        }
6483        Ok(__struct)
6484    }
6485    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6486        let mut __tmp = BytesMut::new(bytes);
6487        #[allow(clippy::absurd_extreme_comparisons)]
6488        #[allow(unused_comparisons)]
6489        if __tmp.remaining() < Self::ENCODED_LEN {
6490            panic!(
6491                "buffer is too small (need {} bytes, but got {})",
6492                Self::ENCODED_LEN,
6493                __tmp.remaining(),
6494            )
6495        }
6496        __tmp.put_u64_le(self.capabilities.bits());
6497        __tmp.put_u64_le(self.uid);
6498        __tmp.put_u32_le(self.flight_sw_version);
6499        __tmp.put_u32_le(self.middleware_sw_version);
6500        __tmp.put_u32_le(self.os_sw_version);
6501        __tmp.put_u32_le(self.board_version);
6502        __tmp.put_u16_le(self.vendor_id);
6503        __tmp.put_u16_le(self.product_id);
6504        for val in &self.flight_custom_version {
6505            __tmp.put_u8(*val);
6506        }
6507        for val in &self.middleware_custom_version {
6508            __tmp.put_u8(*val);
6509        }
6510        for val in &self.os_custom_version {
6511            __tmp.put_u8(*val);
6512        }
6513        if matches!(version, MavlinkVersion::V2) {
6514            for val in &self.uid2 {
6515                __tmp.put_u8(*val);
6516            }
6517            let len = __tmp.len();
6518            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6519        } else {
6520            __tmp.len()
6521        }
6522    }
6523}
6524#[doc = "Information about a flight mode.          The message can be enumerated to get information for all modes, or requested for a particular mode, using MAV_CMD_REQUEST_MESSAGE.         Specify 0 in param2 to request that the message is emitted for all available modes or the specific index for just one mode.         The modes must be available/settable for the current vehicle/frame type.         Each mode should only be emitted once (even if it is both standard and custom).         Note that the current mode should be emitted in CURRENT_MODE, and that if the mode list can change then AVAILABLE_MODES_MONITOR must be emitted on first change and subsequently streamed.         See <https://mavlink.io/en/services/standard_modes.html>."]
6525#[doc = ""]
6526#[doc = "ID: 435"]
6527#[derive(Debug, Clone, PartialEq)]
6528#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6529#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6530pub struct AVAILABLE_MODES_DATA {
6531    #[doc = "A bitfield for use for autopilot-specific flags"]
6532    pub custom_mode: u32,
6533    #[doc = "Mode properties."]
6534    pub properties: MavModeProperty,
6535    #[doc = "The total number of available modes for the current vehicle type."]
6536    pub number_modes: u8,
6537    #[doc = "The current mode index within number_modes, indexed from 1. The index is not guaranteed to be persistent, and may change between reboots or if the set of modes change."]
6538    pub mode_index: u8,
6539    #[doc = "Standard mode."]
6540    pub standard_mode: MavStandardMode,
6541    #[doc = "Name of custom mode, with null termination character. Should be omitted for standard modes."]
6542    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6543    pub mode_name: [u8; 35],
6544}
6545impl AVAILABLE_MODES_DATA {
6546    pub const ENCODED_LEN: usize = 46usize;
6547    pub const DEFAULT: Self = Self {
6548        custom_mode: 0_u32,
6549        properties: MavModeProperty::DEFAULT,
6550        number_modes: 0_u8,
6551        mode_index: 0_u8,
6552        standard_mode: MavStandardMode::DEFAULT,
6553        mode_name: [0_u8; 35usize],
6554    };
6555    #[cfg(feature = "arbitrary")]
6556    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6557        use arbitrary::{Arbitrary, Unstructured};
6558        let mut buf = [0u8; 1024];
6559        rng.fill_bytes(&mut buf);
6560        let mut unstructured = Unstructured::new(&buf);
6561        Self::arbitrary(&mut unstructured).unwrap_or_default()
6562    }
6563}
6564impl Default for AVAILABLE_MODES_DATA {
6565    fn default() -> Self {
6566        Self::DEFAULT.clone()
6567    }
6568}
6569impl MessageData for AVAILABLE_MODES_DATA {
6570    type Message = MavMessage;
6571    const ID: u32 = 435u32;
6572    const NAME: &'static str = "AVAILABLE_MODES";
6573    const EXTRA_CRC: u8 = 134u8;
6574    const ENCODED_LEN: usize = 46usize;
6575    fn deser(
6576        _version: MavlinkVersion,
6577        __input: &[u8],
6578    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6579        let avail_len = __input.len();
6580        let mut payload_buf = [0; Self::ENCODED_LEN];
6581        let mut buf = if avail_len < Self::ENCODED_LEN {
6582            payload_buf[0..avail_len].copy_from_slice(__input);
6583            Bytes::new(&payload_buf)
6584        } else {
6585            Bytes::new(__input)
6586        };
6587        let mut __struct = Self::default();
6588        __struct.custom_mode = buf.get_u32_le();
6589        let tmp = buf.get_u32_le();
6590        __struct.properties = MavModeProperty::from_bits(tmp & MavModeProperty::all().bits())
6591            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
6592                flag_type: "MavModeProperty",
6593                value: tmp as u32,
6594            })?;
6595        __struct.number_modes = buf.get_u8();
6596        __struct.mode_index = buf.get_u8();
6597        let tmp = buf.get_u8();
6598        __struct.standard_mode =
6599            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6600                enum_type: "MavStandardMode",
6601                value: tmp as u32,
6602            })?;
6603        for v in &mut __struct.mode_name {
6604            let val = buf.get_u8();
6605            *v = val;
6606        }
6607        Ok(__struct)
6608    }
6609    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6610        let mut __tmp = BytesMut::new(bytes);
6611        #[allow(clippy::absurd_extreme_comparisons)]
6612        #[allow(unused_comparisons)]
6613        if __tmp.remaining() < Self::ENCODED_LEN {
6614            panic!(
6615                "buffer is too small (need {} bytes, but got {})",
6616                Self::ENCODED_LEN,
6617                __tmp.remaining(),
6618            )
6619        }
6620        __tmp.put_u32_le(self.custom_mode);
6621        __tmp.put_u32_le(self.properties.bits());
6622        __tmp.put_u8(self.number_modes);
6623        __tmp.put_u8(self.mode_index);
6624        __tmp.put_u8(self.standard_mode as u8);
6625        for val in &self.mode_name {
6626            __tmp.put_u8(*val);
6627        }
6628        if matches!(version, MavlinkVersion::V2) {
6629            let len = __tmp.len();
6630            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6631        } else {
6632            __tmp.len()
6633        }
6634    }
6635}
6636#[doc = "A change to the sequence number indicates that the set of AVAILABLE_MODES has changed.         A receiver must re-request all available modes whenever the sequence number changes.         This is only emitted after the first change and should then be broadcast at low rate (nominally 0.3 Hz) and on change.         See <https://mavlink.io/en/services/standard_modes.html>."]
6637#[doc = ""]
6638#[doc = "ID: 437"]
6639#[derive(Debug, Clone, PartialEq)]
6640#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6641#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6642pub struct AVAILABLE_MODES_MONITOR_DATA {
6643    #[doc = "Sequence number. The value iterates sequentially whenever AVAILABLE_MODES changes (e.g. support for a new mode is added/removed dynamically)."]
6644    pub seq: u8,
6645}
6646impl AVAILABLE_MODES_MONITOR_DATA {
6647    pub const ENCODED_LEN: usize = 1usize;
6648    pub const DEFAULT: Self = Self { seq: 0_u8 };
6649    #[cfg(feature = "arbitrary")]
6650    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6651        use arbitrary::{Arbitrary, Unstructured};
6652        let mut buf = [0u8; 1024];
6653        rng.fill_bytes(&mut buf);
6654        let mut unstructured = Unstructured::new(&buf);
6655        Self::arbitrary(&mut unstructured).unwrap_or_default()
6656    }
6657}
6658impl Default for AVAILABLE_MODES_MONITOR_DATA {
6659    fn default() -> Self {
6660        Self::DEFAULT.clone()
6661    }
6662}
6663impl MessageData for AVAILABLE_MODES_MONITOR_DATA {
6664    type Message = MavMessage;
6665    const ID: u32 = 437u32;
6666    const NAME: &'static str = "AVAILABLE_MODES_MONITOR";
6667    const EXTRA_CRC: u8 = 30u8;
6668    const ENCODED_LEN: usize = 1usize;
6669    fn deser(
6670        _version: MavlinkVersion,
6671        __input: &[u8],
6672    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6673        let avail_len = __input.len();
6674        let mut payload_buf = [0; Self::ENCODED_LEN];
6675        let mut buf = if avail_len < Self::ENCODED_LEN {
6676            payload_buf[0..avail_len].copy_from_slice(__input);
6677            Bytes::new(&payload_buf)
6678        } else {
6679            Bytes::new(__input)
6680        };
6681        let mut __struct = Self::default();
6682        __struct.seq = buf.get_u8();
6683        Ok(__struct)
6684    }
6685    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6686        let mut __tmp = BytesMut::new(bytes);
6687        #[allow(clippy::absurd_extreme_comparisons)]
6688        #[allow(unused_comparisons)]
6689        if __tmp.remaining() < Self::ENCODED_LEN {
6690            panic!(
6691                "buffer is too small (need {} bytes, but got {})",
6692                Self::ENCODED_LEN,
6693                __tmp.remaining(),
6694            )
6695        }
6696        __tmp.put_u8(self.seq);
6697        if matches!(version, MavlinkVersion::V2) {
6698            let len = __tmp.len();
6699            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6700        } else {
6701            __tmp.len()
6702        }
6703    }
6704}
6705#[doc = "Battery information that is static, or requires infrequent update.         This message should requested using MAV_CMD_REQUEST_MESSAGE and/or streamed at very low rate.         BATTERY_STATUS_V2 is used for higher-rate battery status information."]
6706#[doc = ""]
6707#[doc = "ID: 372"]
6708#[derive(Debug, Clone, PartialEq)]
6709#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6710#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6711pub struct BATTERY_INFO_DATA {
6712    #[doc = "Minimum per-cell voltage when discharging. 0: field not provided."]
6713    pub discharge_minimum_voltage: f32,
6714    #[doc = "Minimum per-cell voltage when charging. 0: field not provided."]
6715    pub charging_minimum_voltage: f32,
6716    #[doc = "Minimum per-cell voltage when resting. 0: field not provided."]
6717    pub resting_minimum_voltage: f32,
6718    #[doc = "Maximum per-cell voltage when charged. 0: field not provided."]
6719    pub charging_maximum_voltage: f32,
6720    #[doc = "Maximum pack continuous charge current. 0: field not provided."]
6721    pub charging_maximum_current: f32,
6722    #[doc = "Battery nominal voltage. Used for conversion between Wh and Ah. 0: field not provided."]
6723    pub nominal_voltage: f32,
6724    #[doc = "Maximum pack discharge current. 0: field not provided."]
6725    pub discharge_maximum_current: f32,
6726    #[doc = "Maximum pack discharge burst current. 0: field not provided."]
6727    pub discharge_maximum_burst_current: f32,
6728    #[doc = "Fully charged design capacity. 0: field not provided."]
6729    pub design_capacity: f32,
6730    #[doc = "Predicted battery capacity when fully charged (accounting for battery degradation). NAN: field not provided."]
6731    pub full_charge_capacity: f32,
6732    #[doc = "Lifetime count of the number of charge/discharge cycles (<https://en.wikipedia.org/wiki/Charge_cycle>). UINT16_MAX: field not provided."]
6733    pub cycle_count: u16,
6734    #[doc = "Battery weight. 0: field not provided."]
6735    pub weight: u16,
6736    #[doc = "Battery ID"]
6737    pub id: u8,
6738    #[doc = "Function of the battery."]
6739    pub battery_function: MavBatteryFunction,
6740    #[doc = "Type (chemistry) of the battery."]
6741    pub mavtype: MavBatteryType,
6742    #[doc = "State of Health (SOH) estimate. Typically 100% at the time of manufacture and will decrease over time and use. -1: field not provided."]
6743    pub state_of_health: u8,
6744    #[doc = "Number of battery cells in series. 0: field not provided."]
6745    pub cells_in_series: u8,
6746    #[doc = "Manufacture date (DDMMYYYY) in ASCII characters, 0 terminated. All 0: field not provided."]
6747    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6748    pub manufacture_date: [u8; 9],
6749    #[doc = "Serial number in ASCII characters, 0 terminated. All 0: field not provided."]
6750    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6751    pub serial_number: [u8; 32],
6752    #[doc = "Battery device name. Formatted as manufacturer name then product name, separated with an underscore (in ASCII characters), 0 terminated. All 0: field not provided."]
6753    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6754    pub name: [u8; 50],
6755}
6756impl BATTERY_INFO_DATA {
6757    pub const ENCODED_LEN: usize = 140usize;
6758    pub const DEFAULT: Self = Self {
6759        discharge_minimum_voltage: 0.0_f32,
6760        charging_minimum_voltage: 0.0_f32,
6761        resting_minimum_voltage: 0.0_f32,
6762        charging_maximum_voltage: 0.0_f32,
6763        charging_maximum_current: 0.0_f32,
6764        nominal_voltage: 0.0_f32,
6765        discharge_maximum_current: 0.0_f32,
6766        discharge_maximum_burst_current: 0.0_f32,
6767        design_capacity: 0.0_f32,
6768        full_charge_capacity: 0.0_f32,
6769        cycle_count: 0_u16,
6770        weight: 0_u16,
6771        id: 0_u8,
6772        battery_function: MavBatteryFunction::DEFAULT,
6773        mavtype: MavBatteryType::DEFAULT,
6774        state_of_health: 0_u8,
6775        cells_in_series: 0_u8,
6776        manufacture_date: [0_u8; 9usize],
6777        serial_number: [0_u8; 32usize],
6778        name: [0_u8; 50usize],
6779    };
6780    #[cfg(feature = "arbitrary")]
6781    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6782        use arbitrary::{Arbitrary, Unstructured};
6783        let mut buf = [0u8; 1024];
6784        rng.fill_bytes(&mut buf);
6785        let mut unstructured = Unstructured::new(&buf);
6786        Self::arbitrary(&mut unstructured).unwrap_or_default()
6787    }
6788}
6789impl Default for BATTERY_INFO_DATA {
6790    fn default() -> Self {
6791        Self::DEFAULT.clone()
6792    }
6793}
6794impl MessageData for BATTERY_INFO_DATA {
6795    type Message = MavMessage;
6796    const ID: u32 = 372u32;
6797    const NAME: &'static str = "BATTERY_INFO";
6798    const EXTRA_CRC: u8 = 26u8;
6799    const ENCODED_LEN: usize = 140usize;
6800    fn deser(
6801        _version: MavlinkVersion,
6802        __input: &[u8],
6803    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6804        let avail_len = __input.len();
6805        let mut payload_buf = [0; Self::ENCODED_LEN];
6806        let mut buf = if avail_len < Self::ENCODED_LEN {
6807            payload_buf[0..avail_len].copy_from_slice(__input);
6808            Bytes::new(&payload_buf)
6809        } else {
6810            Bytes::new(__input)
6811        };
6812        let mut __struct = Self::default();
6813        __struct.discharge_minimum_voltage = buf.get_f32_le();
6814        __struct.charging_minimum_voltage = buf.get_f32_le();
6815        __struct.resting_minimum_voltage = buf.get_f32_le();
6816        __struct.charging_maximum_voltage = buf.get_f32_le();
6817        __struct.charging_maximum_current = buf.get_f32_le();
6818        __struct.nominal_voltage = buf.get_f32_le();
6819        __struct.discharge_maximum_current = buf.get_f32_le();
6820        __struct.discharge_maximum_burst_current = buf.get_f32_le();
6821        __struct.design_capacity = buf.get_f32_le();
6822        __struct.full_charge_capacity = buf.get_f32_le();
6823        __struct.cycle_count = buf.get_u16_le();
6824        __struct.weight = buf.get_u16_le();
6825        __struct.id = buf.get_u8();
6826        let tmp = buf.get_u8();
6827        __struct.battery_function =
6828            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6829                enum_type: "MavBatteryFunction",
6830                value: tmp as u32,
6831            })?;
6832        let tmp = buf.get_u8();
6833        __struct.mavtype =
6834            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6835                enum_type: "MavBatteryType",
6836                value: tmp as u32,
6837            })?;
6838        __struct.state_of_health = buf.get_u8();
6839        __struct.cells_in_series = buf.get_u8();
6840        for v in &mut __struct.manufacture_date {
6841            let val = buf.get_u8();
6842            *v = val;
6843        }
6844        for v in &mut __struct.serial_number {
6845            let val = buf.get_u8();
6846            *v = val;
6847        }
6848        for v in &mut __struct.name {
6849            let val = buf.get_u8();
6850            *v = val;
6851        }
6852        Ok(__struct)
6853    }
6854    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6855        let mut __tmp = BytesMut::new(bytes);
6856        #[allow(clippy::absurd_extreme_comparisons)]
6857        #[allow(unused_comparisons)]
6858        if __tmp.remaining() < Self::ENCODED_LEN {
6859            panic!(
6860                "buffer is too small (need {} bytes, but got {})",
6861                Self::ENCODED_LEN,
6862                __tmp.remaining(),
6863            )
6864        }
6865        __tmp.put_f32_le(self.discharge_minimum_voltage);
6866        __tmp.put_f32_le(self.charging_minimum_voltage);
6867        __tmp.put_f32_le(self.resting_minimum_voltage);
6868        __tmp.put_f32_le(self.charging_maximum_voltage);
6869        __tmp.put_f32_le(self.charging_maximum_current);
6870        __tmp.put_f32_le(self.nominal_voltage);
6871        __tmp.put_f32_le(self.discharge_maximum_current);
6872        __tmp.put_f32_le(self.discharge_maximum_burst_current);
6873        __tmp.put_f32_le(self.design_capacity);
6874        __tmp.put_f32_le(self.full_charge_capacity);
6875        __tmp.put_u16_le(self.cycle_count);
6876        __tmp.put_u16_le(self.weight);
6877        __tmp.put_u8(self.id);
6878        __tmp.put_u8(self.battery_function as u8);
6879        __tmp.put_u8(self.mavtype as u8);
6880        __tmp.put_u8(self.state_of_health);
6881        __tmp.put_u8(self.cells_in_series);
6882        for val in &self.manufacture_date {
6883            __tmp.put_u8(*val);
6884        }
6885        for val in &self.serial_number {
6886            __tmp.put_u8(*val);
6887        }
6888        for val in &self.name {
6889            __tmp.put_u8(*val);
6890        }
6891        if matches!(version, MavlinkVersion::V2) {
6892            let len = __tmp.len();
6893            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6894        } else {
6895            __tmp.len()
6896        }
6897    }
6898}
6899#[doc = "Battery information. Updates GCS with flight controller battery status. Smart batteries also use this message, but may additionally send BATTERY_INFO."]
6900#[doc = ""]
6901#[doc = "ID: 147"]
6902#[derive(Debug, Clone, PartialEq)]
6903#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6904#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6905pub struct BATTERY_STATUS_DATA {
6906    #[doc = "Consumed charge, -1: autopilot does not provide consumption estimate"]
6907    pub current_consumed: i32,
6908    #[doc = "Consumed energy, -1: autopilot does not provide energy consumption estimate"]
6909    pub energy_consumed: i32,
6910    #[doc = "Temperature of the battery. INT16_MAX for unknown temperature."]
6911    pub temperature: i16,
6912    #[doc = "Battery voltage of cells 1 to 10 (see voltages_ext for cells 11-14). Cells in this field above the valid cell count for this battery should have the UINT16_MAX value. If individual cell voltages are unknown or not measured for this battery, then the overall battery voltage should be filled in cell 0, with all others set to UINT16_MAX. If the voltage of the battery is greater than (UINT16_MAX - 1), then cell 0 should be set to (UINT16_MAX - 1), and cell 1 to the remaining voltage. This can be extended to multiple cells if the total voltage is greater than 2 * (UINT16_MAX - 1)."]
6913    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6914    pub voltages: [u16; 10],
6915    #[doc = "Battery current, -1: autopilot does not measure the current"]
6916    pub current_battery: i16,
6917    #[doc = "Battery ID"]
6918    pub id: u8,
6919    #[doc = "Function of the battery"]
6920    pub battery_function: MavBatteryFunction,
6921    #[doc = "Type (chemistry) of the battery"]
6922    pub mavtype: MavBatteryType,
6923    #[doc = "Remaining battery energy. Values: [0-100], -1: autopilot does not estimate the remaining battery."]
6924    pub battery_remaining: i8,
6925    #[doc = "Remaining battery time, 0: autopilot does not provide remaining battery time estimate"]
6926    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
6927    pub time_remaining: i32,
6928    #[doc = "State for extent of discharge, provided by autopilot for warning or external reactions"]
6929    #[cfg_attr(feature = "serde", serde(default))]
6930    pub charge_state: MavBatteryChargeState,
6931    #[doc = "Battery voltages for cells 11 to 14. Cells above the valid cell count for this battery should have a value of 0, where zero indicates not supported (note, this is different than for the voltages field and allows empty byte truncation). If the measured value is 0 then 1 should be sent instead."]
6932    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
6933    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6934    pub voltages_ext: [u16; 4],
6935    #[doc = "Battery mode. Default (0) is that battery mode reporting is not supported or battery is in normal-use mode."]
6936    #[cfg_attr(feature = "serde", serde(default))]
6937    pub mode: MavBatteryMode,
6938    #[doc = "Fault/health indications. These should be set when charge_state is MAV_BATTERY_CHARGE_STATE_FAILED or MAV_BATTERY_CHARGE_STATE_UNHEALTHY (if not, fault reporting is not supported)."]
6939    #[cfg_attr(feature = "serde", serde(default))]
6940    pub fault_bitmask: MavBatteryFault,
6941}
6942impl BATTERY_STATUS_DATA {
6943    pub const ENCODED_LEN: usize = 54usize;
6944    pub const DEFAULT: Self = Self {
6945        current_consumed: 0_i32,
6946        energy_consumed: 0_i32,
6947        temperature: 0_i16,
6948        voltages: [0_u16; 10usize],
6949        current_battery: 0_i16,
6950        id: 0_u8,
6951        battery_function: MavBatteryFunction::DEFAULT,
6952        mavtype: MavBatteryType::DEFAULT,
6953        battery_remaining: 0_i8,
6954        time_remaining: 0_i32,
6955        charge_state: MavBatteryChargeState::DEFAULT,
6956        voltages_ext: [0_u16; 4usize],
6957        mode: MavBatteryMode::DEFAULT,
6958        fault_bitmask: MavBatteryFault::DEFAULT,
6959    };
6960    #[cfg(feature = "arbitrary")]
6961    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6962        use arbitrary::{Arbitrary, Unstructured};
6963        let mut buf = [0u8; 1024];
6964        rng.fill_bytes(&mut buf);
6965        let mut unstructured = Unstructured::new(&buf);
6966        Self::arbitrary(&mut unstructured).unwrap_or_default()
6967    }
6968}
6969impl Default for BATTERY_STATUS_DATA {
6970    fn default() -> Self {
6971        Self::DEFAULT.clone()
6972    }
6973}
6974impl MessageData for BATTERY_STATUS_DATA {
6975    type Message = MavMessage;
6976    const ID: u32 = 147u32;
6977    const NAME: &'static str = "BATTERY_STATUS";
6978    const EXTRA_CRC: u8 = 154u8;
6979    const ENCODED_LEN: usize = 54usize;
6980    fn deser(
6981        _version: MavlinkVersion,
6982        __input: &[u8],
6983    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6984        let avail_len = __input.len();
6985        let mut payload_buf = [0; Self::ENCODED_LEN];
6986        let mut buf = if avail_len < Self::ENCODED_LEN {
6987            payload_buf[0..avail_len].copy_from_slice(__input);
6988            Bytes::new(&payload_buf)
6989        } else {
6990            Bytes::new(__input)
6991        };
6992        let mut __struct = Self::default();
6993        __struct.current_consumed = buf.get_i32_le();
6994        __struct.energy_consumed = buf.get_i32_le();
6995        __struct.temperature = buf.get_i16_le();
6996        for v in &mut __struct.voltages {
6997            let val = buf.get_u16_le();
6998            *v = val;
6999        }
7000        __struct.current_battery = buf.get_i16_le();
7001        __struct.id = buf.get_u8();
7002        let tmp = buf.get_u8();
7003        __struct.battery_function =
7004            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7005                enum_type: "MavBatteryFunction",
7006                value: tmp as u32,
7007            })?;
7008        let tmp = buf.get_u8();
7009        __struct.mavtype =
7010            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7011                enum_type: "MavBatteryType",
7012                value: tmp as u32,
7013            })?;
7014        __struct.battery_remaining = buf.get_i8();
7015        __struct.time_remaining = buf.get_i32_le();
7016        let tmp = buf.get_u8();
7017        __struct.charge_state =
7018            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7019                enum_type: "MavBatteryChargeState",
7020                value: tmp as u32,
7021            })?;
7022        for v in &mut __struct.voltages_ext {
7023            let val = buf.get_u16_le();
7024            *v = val;
7025        }
7026        let tmp = buf.get_u8();
7027        __struct.mode =
7028            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7029                enum_type: "MavBatteryMode",
7030                value: tmp as u32,
7031            })?;
7032        let tmp = buf.get_u32_le();
7033        __struct.fault_bitmask = MavBatteryFault::from_bits(tmp & MavBatteryFault::all().bits())
7034            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
7035                flag_type: "MavBatteryFault",
7036                value: tmp as u32,
7037            })?;
7038        Ok(__struct)
7039    }
7040    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7041        let mut __tmp = BytesMut::new(bytes);
7042        #[allow(clippy::absurd_extreme_comparisons)]
7043        #[allow(unused_comparisons)]
7044        if __tmp.remaining() < Self::ENCODED_LEN {
7045            panic!(
7046                "buffer is too small (need {} bytes, but got {})",
7047                Self::ENCODED_LEN,
7048                __tmp.remaining(),
7049            )
7050        }
7051        __tmp.put_i32_le(self.current_consumed);
7052        __tmp.put_i32_le(self.energy_consumed);
7053        __tmp.put_i16_le(self.temperature);
7054        for val in &self.voltages {
7055            __tmp.put_u16_le(*val);
7056        }
7057        __tmp.put_i16_le(self.current_battery);
7058        __tmp.put_u8(self.id);
7059        __tmp.put_u8(self.battery_function as u8);
7060        __tmp.put_u8(self.mavtype as u8);
7061        __tmp.put_i8(self.battery_remaining);
7062        if matches!(version, MavlinkVersion::V2) {
7063            __tmp.put_i32_le(self.time_remaining);
7064            __tmp.put_u8(self.charge_state as u8);
7065            for val in &self.voltages_ext {
7066                __tmp.put_u16_le(*val);
7067            }
7068            __tmp.put_u8(self.mode as u8);
7069            __tmp.put_u32_le(self.fault_bitmask.bits());
7070            let len = __tmp.len();
7071            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7072        } else {
7073            __tmp.len()
7074        }
7075    }
7076}
7077#[doc = "Report button state change."]
7078#[doc = ""]
7079#[doc = "ID: 257"]
7080#[derive(Debug, Clone, PartialEq)]
7081#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7082#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7083pub struct BUTTON_CHANGE_DATA {
7084    #[doc = "Timestamp (time since system boot)."]
7085    pub time_boot_ms: u32,
7086    #[doc = "Time of last change of button state."]
7087    pub last_change_ms: u32,
7088    #[doc = "Bitmap for state of buttons."]
7089    pub state: u8,
7090}
7091impl BUTTON_CHANGE_DATA {
7092    pub const ENCODED_LEN: usize = 9usize;
7093    pub const DEFAULT: Self = Self {
7094        time_boot_ms: 0_u32,
7095        last_change_ms: 0_u32,
7096        state: 0_u8,
7097    };
7098    #[cfg(feature = "arbitrary")]
7099    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7100        use arbitrary::{Arbitrary, Unstructured};
7101        let mut buf = [0u8; 1024];
7102        rng.fill_bytes(&mut buf);
7103        let mut unstructured = Unstructured::new(&buf);
7104        Self::arbitrary(&mut unstructured).unwrap_or_default()
7105    }
7106}
7107impl Default for BUTTON_CHANGE_DATA {
7108    fn default() -> Self {
7109        Self::DEFAULT.clone()
7110    }
7111}
7112impl MessageData for BUTTON_CHANGE_DATA {
7113    type Message = MavMessage;
7114    const ID: u32 = 257u32;
7115    const NAME: &'static str = "BUTTON_CHANGE";
7116    const EXTRA_CRC: u8 = 131u8;
7117    const ENCODED_LEN: usize = 9usize;
7118    fn deser(
7119        _version: MavlinkVersion,
7120        __input: &[u8],
7121    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7122        let avail_len = __input.len();
7123        let mut payload_buf = [0; Self::ENCODED_LEN];
7124        let mut buf = if avail_len < Self::ENCODED_LEN {
7125            payload_buf[0..avail_len].copy_from_slice(__input);
7126            Bytes::new(&payload_buf)
7127        } else {
7128            Bytes::new(__input)
7129        };
7130        let mut __struct = Self::default();
7131        __struct.time_boot_ms = buf.get_u32_le();
7132        __struct.last_change_ms = buf.get_u32_le();
7133        __struct.state = buf.get_u8();
7134        Ok(__struct)
7135    }
7136    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7137        let mut __tmp = BytesMut::new(bytes);
7138        #[allow(clippy::absurd_extreme_comparisons)]
7139        #[allow(unused_comparisons)]
7140        if __tmp.remaining() < Self::ENCODED_LEN {
7141            panic!(
7142                "buffer is too small (need {} bytes, but got {})",
7143                Self::ENCODED_LEN,
7144                __tmp.remaining(),
7145            )
7146        }
7147        __tmp.put_u32_le(self.time_boot_ms);
7148        __tmp.put_u32_le(self.last_change_ms);
7149        __tmp.put_u8(self.state);
7150        if matches!(version, MavlinkVersion::V2) {
7151            let len = __tmp.len();
7152            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7153        } else {
7154            __tmp.len()
7155        }
7156    }
7157}
7158#[doc = "Information about the status of a capture. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
7159#[doc = ""]
7160#[doc = "ID: 262"]
7161#[derive(Debug, Clone, PartialEq)]
7162#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7163#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7164pub struct CAMERA_CAPTURE_STATUS_DATA {
7165    #[doc = "Timestamp (time since system boot)."]
7166    pub time_boot_ms: u32,
7167    #[doc = "Image capture interval"]
7168    pub image_interval: f32,
7169    #[doc = "Elapsed time since recording started (0: Not supported/available). A GCS should compute recording time and use non-zero values of this field to correct any discrepancy."]
7170    pub recording_time_ms: u32,
7171    #[doc = "Available storage capacity."]
7172    pub available_capacity: f32,
7173    #[doc = "Current status of image capturing (0: idle, 1: capture in progress, 2: interval set but idle, 3: interval set and capture in progress)"]
7174    pub image_status: u8,
7175    #[doc = "Current status of video capturing (0: idle, 1: capture in progress)"]
7176    pub video_status: u8,
7177    #[doc = "Total number of images captured ('forever', or until reset using MAV_CMD_STORAGE_FORMAT)."]
7178    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7179    pub image_count: i32,
7180    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
7181    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7182    pub camera_device_id: u8,
7183}
7184impl CAMERA_CAPTURE_STATUS_DATA {
7185    pub const ENCODED_LEN: usize = 23usize;
7186    pub const DEFAULT: Self = Self {
7187        time_boot_ms: 0_u32,
7188        image_interval: 0.0_f32,
7189        recording_time_ms: 0_u32,
7190        available_capacity: 0.0_f32,
7191        image_status: 0_u8,
7192        video_status: 0_u8,
7193        image_count: 0_i32,
7194        camera_device_id: 0_u8,
7195    };
7196    #[cfg(feature = "arbitrary")]
7197    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7198        use arbitrary::{Arbitrary, Unstructured};
7199        let mut buf = [0u8; 1024];
7200        rng.fill_bytes(&mut buf);
7201        let mut unstructured = Unstructured::new(&buf);
7202        Self::arbitrary(&mut unstructured).unwrap_or_default()
7203    }
7204}
7205impl Default for CAMERA_CAPTURE_STATUS_DATA {
7206    fn default() -> Self {
7207        Self::DEFAULT.clone()
7208    }
7209}
7210impl MessageData for CAMERA_CAPTURE_STATUS_DATA {
7211    type Message = MavMessage;
7212    const ID: u32 = 262u32;
7213    const NAME: &'static str = "CAMERA_CAPTURE_STATUS";
7214    const EXTRA_CRC: u8 = 12u8;
7215    const ENCODED_LEN: usize = 23usize;
7216    fn deser(
7217        _version: MavlinkVersion,
7218        __input: &[u8],
7219    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7220        let avail_len = __input.len();
7221        let mut payload_buf = [0; Self::ENCODED_LEN];
7222        let mut buf = if avail_len < Self::ENCODED_LEN {
7223            payload_buf[0..avail_len].copy_from_slice(__input);
7224            Bytes::new(&payload_buf)
7225        } else {
7226            Bytes::new(__input)
7227        };
7228        let mut __struct = Self::default();
7229        __struct.time_boot_ms = buf.get_u32_le();
7230        __struct.image_interval = buf.get_f32_le();
7231        __struct.recording_time_ms = buf.get_u32_le();
7232        __struct.available_capacity = buf.get_f32_le();
7233        __struct.image_status = buf.get_u8();
7234        __struct.video_status = buf.get_u8();
7235        __struct.image_count = buf.get_i32_le();
7236        __struct.camera_device_id = buf.get_u8();
7237        Ok(__struct)
7238    }
7239    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7240        let mut __tmp = BytesMut::new(bytes);
7241        #[allow(clippy::absurd_extreme_comparisons)]
7242        #[allow(unused_comparisons)]
7243        if __tmp.remaining() < Self::ENCODED_LEN {
7244            panic!(
7245                "buffer is too small (need {} bytes, but got {})",
7246                Self::ENCODED_LEN,
7247                __tmp.remaining(),
7248            )
7249        }
7250        __tmp.put_u32_le(self.time_boot_ms);
7251        __tmp.put_f32_le(self.image_interval);
7252        __tmp.put_u32_le(self.recording_time_ms);
7253        __tmp.put_f32_le(self.available_capacity);
7254        __tmp.put_u8(self.image_status);
7255        __tmp.put_u8(self.video_status);
7256        if matches!(version, MavlinkVersion::V2) {
7257            __tmp.put_i32_le(self.image_count);
7258            __tmp.put_u8(self.camera_device_id);
7259            let len = __tmp.len();
7260            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7261        } else {
7262            __tmp.len()
7263        }
7264    }
7265}
7266#[doc = "Information about the field of view of a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
7267#[doc = ""]
7268#[doc = "ID: 271"]
7269#[derive(Debug, Clone, PartialEq)]
7270#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7271#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7272pub struct CAMERA_FOV_STATUS_DATA {
7273    #[doc = "Timestamp (time since system boot)."]
7274    pub time_boot_ms: u32,
7275    #[doc = "Latitude of camera (INT32_MAX if unknown)."]
7276    pub lat_camera: i32,
7277    #[doc = "Longitude of camera (INT32_MAX if unknown)."]
7278    pub lon_camera: i32,
7279    #[doc = "Altitude (MSL) of camera (INT32_MAX if unknown)."]
7280    pub alt_camera: i32,
7281    #[doc = "Latitude of center of image (INT32_MAX if unknown, INT32_MIN if at infinity, not intersecting with horizon)."]
7282    pub lat_image: i32,
7283    #[doc = "Longitude of center of image (INT32_MAX if unknown, INT32_MIN if at infinity, not intersecting with horizon)."]
7284    pub lon_image: i32,
7285    #[doc = "Altitude (MSL) of center of image (INT32_MAX if unknown, INT32_MIN if at infinity, not intersecting with horizon)."]
7286    pub alt_image: i32,
7287    #[doc = "Quaternion of camera orientation (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
7288    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7289    pub q: [f32; 4],
7290    #[doc = "Horizontal field of view (NaN if unknown)."]
7291    pub hfov: f32,
7292    #[doc = "Vertical field of view (NaN if unknown)."]
7293    pub vfov: f32,
7294    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
7295    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7296    pub camera_device_id: u8,
7297}
7298impl CAMERA_FOV_STATUS_DATA {
7299    pub const ENCODED_LEN: usize = 53usize;
7300    pub const DEFAULT: Self = Self {
7301        time_boot_ms: 0_u32,
7302        lat_camera: 0_i32,
7303        lon_camera: 0_i32,
7304        alt_camera: 0_i32,
7305        lat_image: 0_i32,
7306        lon_image: 0_i32,
7307        alt_image: 0_i32,
7308        q: [0.0_f32; 4usize],
7309        hfov: 0.0_f32,
7310        vfov: 0.0_f32,
7311        camera_device_id: 0_u8,
7312    };
7313    #[cfg(feature = "arbitrary")]
7314    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7315        use arbitrary::{Arbitrary, Unstructured};
7316        let mut buf = [0u8; 1024];
7317        rng.fill_bytes(&mut buf);
7318        let mut unstructured = Unstructured::new(&buf);
7319        Self::arbitrary(&mut unstructured).unwrap_or_default()
7320    }
7321}
7322impl Default for CAMERA_FOV_STATUS_DATA {
7323    fn default() -> Self {
7324        Self::DEFAULT.clone()
7325    }
7326}
7327impl MessageData for CAMERA_FOV_STATUS_DATA {
7328    type Message = MavMessage;
7329    const ID: u32 = 271u32;
7330    const NAME: &'static str = "CAMERA_FOV_STATUS";
7331    const EXTRA_CRC: u8 = 22u8;
7332    const ENCODED_LEN: usize = 53usize;
7333    fn deser(
7334        _version: MavlinkVersion,
7335        __input: &[u8],
7336    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7337        let avail_len = __input.len();
7338        let mut payload_buf = [0; Self::ENCODED_LEN];
7339        let mut buf = if avail_len < Self::ENCODED_LEN {
7340            payload_buf[0..avail_len].copy_from_slice(__input);
7341            Bytes::new(&payload_buf)
7342        } else {
7343            Bytes::new(__input)
7344        };
7345        let mut __struct = Self::default();
7346        __struct.time_boot_ms = buf.get_u32_le();
7347        __struct.lat_camera = buf.get_i32_le();
7348        __struct.lon_camera = buf.get_i32_le();
7349        __struct.alt_camera = buf.get_i32_le();
7350        __struct.lat_image = buf.get_i32_le();
7351        __struct.lon_image = buf.get_i32_le();
7352        __struct.alt_image = buf.get_i32_le();
7353        for v in &mut __struct.q {
7354            let val = buf.get_f32_le();
7355            *v = val;
7356        }
7357        __struct.hfov = buf.get_f32_le();
7358        __struct.vfov = buf.get_f32_le();
7359        __struct.camera_device_id = buf.get_u8();
7360        Ok(__struct)
7361    }
7362    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7363        let mut __tmp = BytesMut::new(bytes);
7364        #[allow(clippy::absurd_extreme_comparisons)]
7365        #[allow(unused_comparisons)]
7366        if __tmp.remaining() < Self::ENCODED_LEN {
7367            panic!(
7368                "buffer is too small (need {} bytes, but got {})",
7369                Self::ENCODED_LEN,
7370                __tmp.remaining(),
7371            )
7372        }
7373        __tmp.put_u32_le(self.time_boot_ms);
7374        __tmp.put_i32_le(self.lat_camera);
7375        __tmp.put_i32_le(self.lon_camera);
7376        __tmp.put_i32_le(self.alt_camera);
7377        __tmp.put_i32_le(self.lat_image);
7378        __tmp.put_i32_le(self.lon_image);
7379        __tmp.put_i32_le(self.alt_image);
7380        for val in &self.q {
7381            __tmp.put_f32_le(*val);
7382        }
7383        __tmp.put_f32_le(self.hfov);
7384        __tmp.put_f32_le(self.vfov);
7385        if matches!(version, MavlinkVersion::V2) {
7386            __tmp.put_u8(self.camera_device_id);
7387            let len = __tmp.len();
7388            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7389        } else {
7390            __tmp.len()
7391        }
7392    }
7393}
7394#[doc = "Information about a captured image. This is emitted every time a message is captured.         MAV_CMD_REQUEST_MESSAGE can be used to (re)request this message for a specific sequence number or range of sequence numbers:         MAV_CMD_REQUEST_MESSAGE.param2 indicates the sequence number the first image to send, or set to -1 to send the message for all sequence numbers.         MAV_CMD_REQUEST_MESSAGE.param3 is used to specify a range of messages to send:         set to 0 (default) to send just the the message for the sequence number in param 2,         set to -1 to send the message for the sequence number in param 2 and all the following sequence numbers,         set to the sequence number of the final message in the range."]
7395#[doc = ""]
7396#[doc = "ID: 263"]
7397#[derive(Debug, Clone, PartialEq)]
7398#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7399#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7400pub struct CAMERA_IMAGE_CAPTURED_DATA {
7401    #[doc = "Timestamp (time since UNIX epoch) in UTC. 0 for unknown."]
7402    pub time_utc: u64,
7403    #[doc = "Timestamp (time since system boot)."]
7404    pub time_boot_ms: u32,
7405    #[doc = "Latitude where image was taken"]
7406    pub lat: i32,
7407    #[doc = "Longitude where capture was taken"]
7408    pub lon: i32,
7409    #[doc = "Altitude (MSL) where image was taken"]
7410    pub alt: i32,
7411    #[doc = "Altitude above ground"]
7412    pub relative_alt: i32,
7413    #[doc = "Quaternion of camera orientation (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
7414    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7415    pub q: [f32; 4],
7416    #[doc = "Zero based index of this image (i.e. a new image will have index CAMERA_CAPTURE_STATUS.image count -1)"]
7417    pub image_index: i32,
7418    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id). Field name is usually camera_device_id."]
7419    pub camera_id: u8,
7420    #[doc = "Boolean indicating success (1) or failure (0) while capturing this image."]
7421    pub capture_result: i8,
7422    #[doc = "URL of image taken. Either local storage or <http://foo.jpg> if camera provides an HTTP interface."]
7423    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7424    pub file_url: [u8; 205],
7425}
7426impl CAMERA_IMAGE_CAPTURED_DATA {
7427    pub const ENCODED_LEN: usize = 255usize;
7428    pub const DEFAULT: Self = Self {
7429        time_utc: 0_u64,
7430        time_boot_ms: 0_u32,
7431        lat: 0_i32,
7432        lon: 0_i32,
7433        alt: 0_i32,
7434        relative_alt: 0_i32,
7435        q: [0.0_f32; 4usize],
7436        image_index: 0_i32,
7437        camera_id: 0_u8,
7438        capture_result: 0_i8,
7439        file_url: [0_u8; 205usize],
7440    };
7441    #[cfg(feature = "arbitrary")]
7442    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7443        use arbitrary::{Arbitrary, Unstructured};
7444        let mut buf = [0u8; 1024];
7445        rng.fill_bytes(&mut buf);
7446        let mut unstructured = Unstructured::new(&buf);
7447        Self::arbitrary(&mut unstructured).unwrap_or_default()
7448    }
7449}
7450impl Default for CAMERA_IMAGE_CAPTURED_DATA {
7451    fn default() -> Self {
7452        Self::DEFAULT.clone()
7453    }
7454}
7455impl MessageData for CAMERA_IMAGE_CAPTURED_DATA {
7456    type Message = MavMessage;
7457    const ID: u32 = 263u32;
7458    const NAME: &'static str = "CAMERA_IMAGE_CAPTURED";
7459    const EXTRA_CRC: u8 = 133u8;
7460    const ENCODED_LEN: usize = 255usize;
7461    fn deser(
7462        _version: MavlinkVersion,
7463        __input: &[u8],
7464    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7465        let avail_len = __input.len();
7466        let mut payload_buf = [0; Self::ENCODED_LEN];
7467        let mut buf = if avail_len < Self::ENCODED_LEN {
7468            payload_buf[0..avail_len].copy_from_slice(__input);
7469            Bytes::new(&payload_buf)
7470        } else {
7471            Bytes::new(__input)
7472        };
7473        let mut __struct = Self::default();
7474        __struct.time_utc = buf.get_u64_le();
7475        __struct.time_boot_ms = buf.get_u32_le();
7476        __struct.lat = buf.get_i32_le();
7477        __struct.lon = buf.get_i32_le();
7478        __struct.alt = buf.get_i32_le();
7479        __struct.relative_alt = buf.get_i32_le();
7480        for v in &mut __struct.q {
7481            let val = buf.get_f32_le();
7482            *v = val;
7483        }
7484        __struct.image_index = buf.get_i32_le();
7485        __struct.camera_id = buf.get_u8();
7486        __struct.capture_result = buf.get_i8();
7487        for v in &mut __struct.file_url {
7488            let val = buf.get_u8();
7489            *v = val;
7490        }
7491        Ok(__struct)
7492    }
7493    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7494        let mut __tmp = BytesMut::new(bytes);
7495        #[allow(clippy::absurd_extreme_comparisons)]
7496        #[allow(unused_comparisons)]
7497        if __tmp.remaining() < Self::ENCODED_LEN {
7498            panic!(
7499                "buffer is too small (need {} bytes, but got {})",
7500                Self::ENCODED_LEN,
7501                __tmp.remaining(),
7502            )
7503        }
7504        __tmp.put_u64_le(self.time_utc);
7505        __tmp.put_u32_le(self.time_boot_ms);
7506        __tmp.put_i32_le(self.lat);
7507        __tmp.put_i32_le(self.lon);
7508        __tmp.put_i32_le(self.alt);
7509        __tmp.put_i32_le(self.relative_alt);
7510        for val in &self.q {
7511            __tmp.put_f32_le(*val);
7512        }
7513        __tmp.put_i32_le(self.image_index);
7514        __tmp.put_u8(self.camera_id);
7515        __tmp.put_i8(self.capture_result);
7516        for val in &self.file_url {
7517            __tmp.put_u8(*val);
7518        }
7519        if matches!(version, MavlinkVersion::V2) {
7520            let len = __tmp.len();
7521            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7522        } else {
7523            __tmp.len()
7524        }
7525    }
7526}
7527#[doc = "Information about a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
7528#[doc = ""]
7529#[doc = "ID: 259"]
7530#[derive(Debug, Clone, PartialEq)]
7531#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7532#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7533pub struct CAMERA_INFORMATION_DATA {
7534    #[doc = "Timestamp (time since system boot)."]
7535    pub time_boot_ms: u32,
7536    #[doc = "0xff). Use 0 if not known."]
7537    pub firmware_version: u32,
7538    #[doc = "Focal length. Use NaN if not known."]
7539    pub focal_length: f32,
7540    #[doc = "Image sensor size horizontal. Use NaN if not known."]
7541    pub sensor_size_h: f32,
7542    #[doc = "Image sensor size vertical. Use NaN if not known."]
7543    pub sensor_size_v: f32,
7544    #[doc = "Bitmap of camera capability flags."]
7545    pub flags: CameraCapFlags,
7546    #[doc = "Horizontal image resolution. Use 0 if not known."]
7547    pub resolution_h: u16,
7548    #[doc = "Vertical image resolution. Use 0 if not known."]
7549    pub resolution_v: u16,
7550    #[doc = "Camera definition version (iteration).  Use 0 if not known."]
7551    pub cam_definition_version: u16,
7552    #[doc = "Name of the camera vendor"]
7553    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7554    pub vendor_name: [u8; 32],
7555    #[doc = "Name of the camera model"]
7556    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7557    pub model_name: [u8; 32],
7558    #[doc = "Reserved for a lens ID.  Use 0 if not known."]
7559    pub lens_id: u8,
7560    #[doc = "Camera definition URI (if any, otherwise only basic functions will be available). HTTP- (http://) and MAVLink FTP- (mavlinkftp://) formatted URIs are allowed (and both must be supported by any GCS that implements the Camera Protocol). The definition file may be xz compressed, which will be indicated by the file extension .xml.xz (a GCS that implements the protocol must support decompressing the file). The string needs to be zero terminated.  Use a zero-length string if not known."]
7561    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7562    pub cam_definition_uri: [u8; 140],
7563    #[doc = "Gimbal id of a gimbal associated with this camera. This is the component id of the gimbal device, or 1-6 for non mavlink gimbals. Use 0 if no gimbal is associated with the camera."]
7564    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7565    pub gimbal_device_id: u8,
7566    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
7567    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7568    pub camera_device_id: u8,
7569}
7570impl CAMERA_INFORMATION_DATA {
7571    pub const ENCODED_LEN: usize = 237usize;
7572    pub const DEFAULT: Self = Self {
7573        time_boot_ms: 0_u32,
7574        firmware_version: 0_u32,
7575        focal_length: 0.0_f32,
7576        sensor_size_h: 0.0_f32,
7577        sensor_size_v: 0.0_f32,
7578        flags: CameraCapFlags::DEFAULT,
7579        resolution_h: 0_u16,
7580        resolution_v: 0_u16,
7581        cam_definition_version: 0_u16,
7582        vendor_name: [0_u8; 32usize],
7583        model_name: [0_u8; 32usize],
7584        lens_id: 0_u8,
7585        cam_definition_uri: [0_u8; 140usize],
7586        gimbal_device_id: 0_u8,
7587        camera_device_id: 0_u8,
7588    };
7589    #[cfg(feature = "arbitrary")]
7590    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7591        use arbitrary::{Arbitrary, Unstructured};
7592        let mut buf = [0u8; 1024];
7593        rng.fill_bytes(&mut buf);
7594        let mut unstructured = Unstructured::new(&buf);
7595        Self::arbitrary(&mut unstructured).unwrap_or_default()
7596    }
7597}
7598impl Default for CAMERA_INFORMATION_DATA {
7599    fn default() -> Self {
7600        Self::DEFAULT.clone()
7601    }
7602}
7603impl MessageData for CAMERA_INFORMATION_DATA {
7604    type Message = MavMessage;
7605    const ID: u32 = 259u32;
7606    const NAME: &'static str = "CAMERA_INFORMATION";
7607    const EXTRA_CRC: u8 = 92u8;
7608    const ENCODED_LEN: usize = 237usize;
7609    fn deser(
7610        _version: MavlinkVersion,
7611        __input: &[u8],
7612    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7613        let avail_len = __input.len();
7614        let mut payload_buf = [0; Self::ENCODED_LEN];
7615        let mut buf = if avail_len < Self::ENCODED_LEN {
7616            payload_buf[0..avail_len].copy_from_slice(__input);
7617            Bytes::new(&payload_buf)
7618        } else {
7619            Bytes::new(__input)
7620        };
7621        let mut __struct = Self::default();
7622        __struct.time_boot_ms = buf.get_u32_le();
7623        __struct.firmware_version = buf.get_u32_le();
7624        __struct.focal_length = buf.get_f32_le();
7625        __struct.sensor_size_h = buf.get_f32_le();
7626        __struct.sensor_size_v = buf.get_f32_le();
7627        let tmp = buf.get_u32_le();
7628        __struct.flags = CameraCapFlags::from_bits(tmp & CameraCapFlags::all().bits()).ok_or(
7629            ::mavlink_core::error::ParserError::InvalidFlag {
7630                flag_type: "CameraCapFlags",
7631                value: tmp as u32,
7632            },
7633        )?;
7634        __struct.resolution_h = buf.get_u16_le();
7635        __struct.resolution_v = buf.get_u16_le();
7636        __struct.cam_definition_version = buf.get_u16_le();
7637        for v in &mut __struct.vendor_name {
7638            let val = buf.get_u8();
7639            *v = val;
7640        }
7641        for v in &mut __struct.model_name {
7642            let val = buf.get_u8();
7643            *v = val;
7644        }
7645        __struct.lens_id = buf.get_u8();
7646        for v in &mut __struct.cam_definition_uri {
7647            let val = buf.get_u8();
7648            *v = val;
7649        }
7650        __struct.gimbal_device_id = buf.get_u8();
7651        __struct.camera_device_id = buf.get_u8();
7652        Ok(__struct)
7653    }
7654    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7655        let mut __tmp = BytesMut::new(bytes);
7656        #[allow(clippy::absurd_extreme_comparisons)]
7657        #[allow(unused_comparisons)]
7658        if __tmp.remaining() < Self::ENCODED_LEN {
7659            panic!(
7660                "buffer is too small (need {} bytes, but got {})",
7661                Self::ENCODED_LEN,
7662                __tmp.remaining(),
7663            )
7664        }
7665        __tmp.put_u32_le(self.time_boot_ms);
7666        __tmp.put_u32_le(self.firmware_version);
7667        __tmp.put_f32_le(self.focal_length);
7668        __tmp.put_f32_le(self.sensor_size_h);
7669        __tmp.put_f32_le(self.sensor_size_v);
7670        __tmp.put_u32_le(self.flags.bits());
7671        __tmp.put_u16_le(self.resolution_h);
7672        __tmp.put_u16_le(self.resolution_v);
7673        __tmp.put_u16_le(self.cam_definition_version);
7674        for val in &self.vendor_name {
7675            __tmp.put_u8(*val);
7676        }
7677        for val in &self.model_name {
7678            __tmp.put_u8(*val);
7679        }
7680        __tmp.put_u8(self.lens_id);
7681        for val in &self.cam_definition_uri {
7682            __tmp.put_u8(*val);
7683        }
7684        if matches!(version, MavlinkVersion::V2) {
7685            __tmp.put_u8(self.gimbal_device_id);
7686            __tmp.put_u8(self.camera_device_id);
7687            let len = __tmp.len();
7688            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7689        } else {
7690            __tmp.len()
7691        }
7692    }
7693}
7694#[doc = "Settings of a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
7695#[doc = ""]
7696#[doc = "ID: 260"]
7697#[derive(Debug, Clone, PartialEq)]
7698#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7699#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7700pub struct CAMERA_SETTINGS_DATA {
7701    #[doc = "Timestamp (time since system boot)."]
7702    pub time_boot_ms: u32,
7703    #[doc = "Camera mode"]
7704    pub mode_id: CameraMode,
7705    #[doc = "Current zoom level as a percentage of the full range (0.0 to 100.0, NaN if not known)"]
7706    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7707    pub zoomLevel: f32,
7708    #[doc = "Current focus level as a percentage of the full range (0.0 to 100.0, NaN if not known)"]
7709    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7710    pub focusLevel: f32,
7711    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
7712    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7713    pub camera_device_id: u8,
7714}
7715impl CAMERA_SETTINGS_DATA {
7716    pub const ENCODED_LEN: usize = 14usize;
7717    pub const DEFAULT: Self = Self {
7718        time_boot_ms: 0_u32,
7719        mode_id: CameraMode::DEFAULT,
7720        zoomLevel: 0.0_f32,
7721        focusLevel: 0.0_f32,
7722        camera_device_id: 0_u8,
7723    };
7724    #[cfg(feature = "arbitrary")]
7725    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7726        use arbitrary::{Arbitrary, Unstructured};
7727        let mut buf = [0u8; 1024];
7728        rng.fill_bytes(&mut buf);
7729        let mut unstructured = Unstructured::new(&buf);
7730        Self::arbitrary(&mut unstructured).unwrap_or_default()
7731    }
7732}
7733impl Default for CAMERA_SETTINGS_DATA {
7734    fn default() -> Self {
7735        Self::DEFAULT.clone()
7736    }
7737}
7738impl MessageData for CAMERA_SETTINGS_DATA {
7739    type Message = MavMessage;
7740    const ID: u32 = 260u32;
7741    const NAME: &'static str = "CAMERA_SETTINGS";
7742    const EXTRA_CRC: u8 = 146u8;
7743    const ENCODED_LEN: usize = 14usize;
7744    fn deser(
7745        _version: MavlinkVersion,
7746        __input: &[u8],
7747    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7748        let avail_len = __input.len();
7749        let mut payload_buf = [0; Self::ENCODED_LEN];
7750        let mut buf = if avail_len < Self::ENCODED_LEN {
7751            payload_buf[0..avail_len].copy_from_slice(__input);
7752            Bytes::new(&payload_buf)
7753        } else {
7754            Bytes::new(__input)
7755        };
7756        let mut __struct = Self::default();
7757        __struct.time_boot_ms = buf.get_u32_le();
7758        let tmp = buf.get_u8();
7759        __struct.mode_id =
7760            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7761                enum_type: "CameraMode",
7762                value: tmp as u32,
7763            })?;
7764        __struct.zoomLevel = buf.get_f32_le();
7765        __struct.focusLevel = buf.get_f32_le();
7766        __struct.camera_device_id = buf.get_u8();
7767        Ok(__struct)
7768    }
7769    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7770        let mut __tmp = BytesMut::new(bytes);
7771        #[allow(clippy::absurd_extreme_comparisons)]
7772        #[allow(unused_comparisons)]
7773        if __tmp.remaining() < Self::ENCODED_LEN {
7774            panic!(
7775                "buffer is too small (need {} bytes, but got {})",
7776                Self::ENCODED_LEN,
7777                __tmp.remaining(),
7778            )
7779        }
7780        __tmp.put_u32_le(self.time_boot_ms);
7781        __tmp.put_u8(self.mode_id as u8);
7782        if matches!(version, MavlinkVersion::V2) {
7783            __tmp.put_f32_le(self.zoomLevel);
7784            __tmp.put_f32_le(self.focusLevel);
7785            __tmp.put_u8(self.camera_device_id);
7786            let len = __tmp.len();
7787            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7788        } else {
7789            __tmp.len()
7790        }
7791    }
7792}
7793#[doc = "Camera absolute thermal range. This can be streamed when the associated VIDEO_STREAM_STATUS `flag` field bit VIDEO_STREAM_STATUS_FLAGS_THERMAL_RANGE_ENABLED is set, but a GCS may choose to only request it for the current active stream. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval (param3 indicates the stream id of the current camera, or 0 for all streams, param4 indicates the target camera_device_id for autopilot-attached cameras or 0 for MAVLink cameras)."]
7794#[doc = ""]
7795#[doc = "ID: 277"]
7796#[derive(Debug, Clone, PartialEq)]
7797#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7798#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7799pub struct CAMERA_THERMAL_RANGE_DATA {
7800    #[doc = "Timestamp (time since system boot)."]
7801    pub time_boot_ms: u32,
7802    #[doc = "Temperature max."]
7803    pub max: f32,
7804    #[doc = "Temperature max point x value (normalized 0..1, 0 is left, 1 is right), NAN if unknown."]
7805    pub max_point_x: f32,
7806    #[doc = "Temperature max point y value (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown."]
7807    pub max_point_y: f32,
7808    #[doc = "Temperature min."]
7809    pub min: f32,
7810    #[doc = "Temperature min point x value (normalized 0..1, 0 is left, 1 is right), NAN if unknown."]
7811    pub min_point_x: f32,
7812    #[doc = "Temperature min point y value (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown."]
7813    pub min_point_y: f32,
7814    #[doc = "Video Stream ID (1 for first, 2 for second, etc.)"]
7815    pub stream_id: u8,
7816    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
7817    pub camera_device_id: u8,
7818}
7819impl CAMERA_THERMAL_RANGE_DATA {
7820    pub const ENCODED_LEN: usize = 30usize;
7821    pub const DEFAULT: Self = Self {
7822        time_boot_ms: 0_u32,
7823        max: 0.0_f32,
7824        max_point_x: 0.0_f32,
7825        max_point_y: 0.0_f32,
7826        min: 0.0_f32,
7827        min_point_x: 0.0_f32,
7828        min_point_y: 0.0_f32,
7829        stream_id: 0_u8,
7830        camera_device_id: 0_u8,
7831    };
7832    #[cfg(feature = "arbitrary")]
7833    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7834        use arbitrary::{Arbitrary, Unstructured};
7835        let mut buf = [0u8; 1024];
7836        rng.fill_bytes(&mut buf);
7837        let mut unstructured = Unstructured::new(&buf);
7838        Self::arbitrary(&mut unstructured).unwrap_or_default()
7839    }
7840}
7841impl Default for CAMERA_THERMAL_RANGE_DATA {
7842    fn default() -> Self {
7843        Self::DEFAULT.clone()
7844    }
7845}
7846impl MessageData for CAMERA_THERMAL_RANGE_DATA {
7847    type Message = MavMessage;
7848    const ID: u32 = 277u32;
7849    const NAME: &'static str = "CAMERA_THERMAL_RANGE";
7850    const EXTRA_CRC: u8 = 62u8;
7851    const ENCODED_LEN: usize = 30usize;
7852    fn deser(
7853        _version: MavlinkVersion,
7854        __input: &[u8],
7855    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7856        let avail_len = __input.len();
7857        let mut payload_buf = [0; Self::ENCODED_LEN];
7858        let mut buf = if avail_len < Self::ENCODED_LEN {
7859            payload_buf[0..avail_len].copy_from_slice(__input);
7860            Bytes::new(&payload_buf)
7861        } else {
7862            Bytes::new(__input)
7863        };
7864        let mut __struct = Self::default();
7865        __struct.time_boot_ms = buf.get_u32_le();
7866        __struct.max = buf.get_f32_le();
7867        __struct.max_point_x = buf.get_f32_le();
7868        __struct.max_point_y = buf.get_f32_le();
7869        __struct.min = buf.get_f32_le();
7870        __struct.min_point_x = buf.get_f32_le();
7871        __struct.min_point_y = buf.get_f32_le();
7872        __struct.stream_id = buf.get_u8();
7873        __struct.camera_device_id = buf.get_u8();
7874        Ok(__struct)
7875    }
7876    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7877        let mut __tmp = BytesMut::new(bytes);
7878        #[allow(clippy::absurd_extreme_comparisons)]
7879        #[allow(unused_comparisons)]
7880        if __tmp.remaining() < Self::ENCODED_LEN {
7881            panic!(
7882                "buffer is too small (need {} bytes, but got {})",
7883                Self::ENCODED_LEN,
7884                __tmp.remaining(),
7885            )
7886        }
7887        __tmp.put_u32_le(self.time_boot_ms);
7888        __tmp.put_f32_le(self.max);
7889        __tmp.put_f32_le(self.max_point_x);
7890        __tmp.put_f32_le(self.max_point_y);
7891        __tmp.put_f32_le(self.min);
7892        __tmp.put_f32_le(self.min_point_x);
7893        __tmp.put_f32_le(self.min_point_y);
7894        __tmp.put_u8(self.stream_id);
7895        __tmp.put_u8(self.camera_device_id);
7896        if matches!(version, MavlinkVersion::V2) {
7897            let len = __tmp.len();
7898            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7899        } else {
7900            __tmp.len()
7901        }
7902    }
7903}
7904#[doc = "Camera tracking status, sent while in active tracking. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval."]
7905#[doc = ""]
7906#[doc = "ID: 276"]
7907#[derive(Debug, Clone, PartialEq)]
7908#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7909#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7910pub struct CAMERA_TRACKING_GEO_STATUS_DATA {
7911    #[doc = "Latitude of tracked object"]
7912    pub lat: i32,
7913    #[doc = "Longitude of tracked object"]
7914    pub lon: i32,
7915    #[doc = "Altitude of tracked object(AMSL, WGS84)"]
7916    pub alt: f32,
7917    #[doc = "Horizontal accuracy. NAN if unknown"]
7918    pub h_acc: f32,
7919    #[doc = "Vertical accuracy. NAN if unknown"]
7920    pub v_acc: f32,
7921    #[doc = "North velocity of tracked object. NAN if unknown"]
7922    pub vel_n: f32,
7923    #[doc = "East velocity of tracked object. NAN if unknown"]
7924    pub vel_e: f32,
7925    #[doc = "Down velocity of tracked object. NAN if unknown"]
7926    pub vel_d: f32,
7927    #[doc = "Velocity accuracy. NAN if unknown"]
7928    pub vel_acc: f32,
7929    #[doc = "Distance between camera and tracked object. NAN if unknown"]
7930    pub dist: f32,
7931    #[doc = "Heading in radians, in NED. NAN if unknown"]
7932    pub hdg: f32,
7933    #[doc = "Accuracy of heading, in NED. NAN if unknown"]
7934    pub hdg_acc: f32,
7935    #[doc = "Current tracking status"]
7936    pub tracking_status: CameraTrackingStatusFlags,
7937    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
7938    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7939    pub camera_device_id: u8,
7940}
7941impl CAMERA_TRACKING_GEO_STATUS_DATA {
7942    pub const ENCODED_LEN: usize = 50usize;
7943    pub const DEFAULT: Self = Self {
7944        lat: 0_i32,
7945        lon: 0_i32,
7946        alt: 0.0_f32,
7947        h_acc: 0.0_f32,
7948        v_acc: 0.0_f32,
7949        vel_n: 0.0_f32,
7950        vel_e: 0.0_f32,
7951        vel_d: 0.0_f32,
7952        vel_acc: 0.0_f32,
7953        dist: 0.0_f32,
7954        hdg: 0.0_f32,
7955        hdg_acc: 0.0_f32,
7956        tracking_status: CameraTrackingStatusFlags::DEFAULT,
7957        camera_device_id: 0_u8,
7958    };
7959    #[cfg(feature = "arbitrary")]
7960    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7961        use arbitrary::{Arbitrary, Unstructured};
7962        let mut buf = [0u8; 1024];
7963        rng.fill_bytes(&mut buf);
7964        let mut unstructured = Unstructured::new(&buf);
7965        Self::arbitrary(&mut unstructured).unwrap_or_default()
7966    }
7967}
7968impl Default for CAMERA_TRACKING_GEO_STATUS_DATA {
7969    fn default() -> Self {
7970        Self::DEFAULT.clone()
7971    }
7972}
7973impl MessageData for CAMERA_TRACKING_GEO_STATUS_DATA {
7974    type Message = MavMessage;
7975    const ID: u32 = 276u32;
7976    const NAME: &'static str = "CAMERA_TRACKING_GEO_STATUS";
7977    const EXTRA_CRC: u8 = 18u8;
7978    const ENCODED_LEN: usize = 50usize;
7979    fn deser(
7980        _version: MavlinkVersion,
7981        __input: &[u8],
7982    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7983        let avail_len = __input.len();
7984        let mut payload_buf = [0; Self::ENCODED_LEN];
7985        let mut buf = if avail_len < Self::ENCODED_LEN {
7986            payload_buf[0..avail_len].copy_from_slice(__input);
7987            Bytes::new(&payload_buf)
7988        } else {
7989            Bytes::new(__input)
7990        };
7991        let mut __struct = Self::default();
7992        __struct.lat = buf.get_i32_le();
7993        __struct.lon = buf.get_i32_le();
7994        __struct.alt = buf.get_f32_le();
7995        __struct.h_acc = buf.get_f32_le();
7996        __struct.v_acc = buf.get_f32_le();
7997        __struct.vel_n = buf.get_f32_le();
7998        __struct.vel_e = buf.get_f32_le();
7999        __struct.vel_d = buf.get_f32_le();
8000        __struct.vel_acc = buf.get_f32_le();
8001        __struct.dist = buf.get_f32_le();
8002        __struct.hdg = buf.get_f32_le();
8003        __struct.hdg_acc = buf.get_f32_le();
8004        let tmp = buf.get_u8();
8005        __struct.tracking_status =
8006            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8007                enum_type: "CameraTrackingStatusFlags",
8008                value: tmp as u32,
8009            })?;
8010        __struct.camera_device_id = buf.get_u8();
8011        Ok(__struct)
8012    }
8013    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8014        let mut __tmp = BytesMut::new(bytes);
8015        #[allow(clippy::absurd_extreme_comparisons)]
8016        #[allow(unused_comparisons)]
8017        if __tmp.remaining() < Self::ENCODED_LEN {
8018            panic!(
8019                "buffer is too small (need {} bytes, but got {})",
8020                Self::ENCODED_LEN,
8021                __tmp.remaining(),
8022            )
8023        }
8024        __tmp.put_i32_le(self.lat);
8025        __tmp.put_i32_le(self.lon);
8026        __tmp.put_f32_le(self.alt);
8027        __tmp.put_f32_le(self.h_acc);
8028        __tmp.put_f32_le(self.v_acc);
8029        __tmp.put_f32_le(self.vel_n);
8030        __tmp.put_f32_le(self.vel_e);
8031        __tmp.put_f32_le(self.vel_d);
8032        __tmp.put_f32_le(self.vel_acc);
8033        __tmp.put_f32_le(self.dist);
8034        __tmp.put_f32_le(self.hdg);
8035        __tmp.put_f32_le(self.hdg_acc);
8036        __tmp.put_u8(self.tracking_status as u8);
8037        if matches!(version, MavlinkVersion::V2) {
8038            __tmp.put_u8(self.camera_device_id);
8039            let len = __tmp.len();
8040            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8041        } else {
8042            __tmp.len()
8043        }
8044    }
8045}
8046#[doc = "Camera tracking status, sent while in active tracking. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval."]
8047#[doc = ""]
8048#[doc = "ID: 275"]
8049#[derive(Debug, Clone, PartialEq)]
8050#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8051#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8052pub struct CAMERA_TRACKING_IMAGE_STATUS_DATA {
8053    #[doc = "Current tracked point x value if CAMERA_TRACKING_MODE_POINT (normalized 0..1, 0 is left, 1 is right), NAN if unknown"]
8054    pub point_x: f32,
8055    #[doc = "Current tracked point y value if CAMERA_TRACKING_MODE_POINT (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown"]
8056    pub point_y: f32,
8057    #[doc = "Current tracked radius if CAMERA_TRACKING_MODE_POINT (normalized 0..1, 0 is image left, 1 is image right), NAN if unknown"]
8058    pub radius: f32,
8059    #[doc = "Current tracked rectangle top x value if CAMERA_TRACKING_MODE_RECTANGLE (normalized 0..1, 0 is left, 1 is right), NAN if unknown"]
8060    pub rec_top_x: f32,
8061    #[doc = "Current tracked rectangle top y value if CAMERA_TRACKING_MODE_RECTANGLE (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown"]
8062    pub rec_top_y: f32,
8063    #[doc = "Current tracked rectangle bottom x value if CAMERA_TRACKING_MODE_RECTANGLE (normalized 0..1, 0 is left, 1 is right), NAN if unknown"]
8064    pub rec_bottom_x: f32,
8065    #[doc = "Current tracked rectangle bottom y value if CAMERA_TRACKING_MODE_RECTANGLE (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown"]
8066    pub rec_bottom_y: f32,
8067    #[doc = "Current tracking status"]
8068    pub tracking_status: CameraTrackingStatusFlags,
8069    #[doc = "Current tracking mode"]
8070    pub tracking_mode: CameraTrackingMode,
8071    #[doc = "Defines location of target data"]
8072    pub target_data: CameraTrackingTargetData,
8073    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
8074    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
8075    pub camera_device_id: u8,
8076}
8077impl CAMERA_TRACKING_IMAGE_STATUS_DATA {
8078    pub const ENCODED_LEN: usize = 32usize;
8079    pub const DEFAULT: Self = Self {
8080        point_x: 0.0_f32,
8081        point_y: 0.0_f32,
8082        radius: 0.0_f32,
8083        rec_top_x: 0.0_f32,
8084        rec_top_y: 0.0_f32,
8085        rec_bottom_x: 0.0_f32,
8086        rec_bottom_y: 0.0_f32,
8087        tracking_status: CameraTrackingStatusFlags::DEFAULT,
8088        tracking_mode: CameraTrackingMode::DEFAULT,
8089        target_data: CameraTrackingTargetData::DEFAULT,
8090        camera_device_id: 0_u8,
8091    };
8092    #[cfg(feature = "arbitrary")]
8093    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8094        use arbitrary::{Arbitrary, Unstructured};
8095        let mut buf = [0u8; 1024];
8096        rng.fill_bytes(&mut buf);
8097        let mut unstructured = Unstructured::new(&buf);
8098        Self::arbitrary(&mut unstructured).unwrap_or_default()
8099    }
8100}
8101impl Default for CAMERA_TRACKING_IMAGE_STATUS_DATA {
8102    fn default() -> Self {
8103        Self::DEFAULT.clone()
8104    }
8105}
8106impl MessageData for CAMERA_TRACKING_IMAGE_STATUS_DATA {
8107    type Message = MavMessage;
8108    const ID: u32 = 275u32;
8109    const NAME: &'static str = "CAMERA_TRACKING_IMAGE_STATUS";
8110    const EXTRA_CRC: u8 = 126u8;
8111    const ENCODED_LEN: usize = 32usize;
8112    fn deser(
8113        _version: MavlinkVersion,
8114        __input: &[u8],
8115    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8116        let avail_len = __input.len();
8117        let mut payload_buf = [0; Self::ENCODED_LEN];
8118        let mut buf = if avail_len < Self::ENCODED_LEN {
8119            payload_buf[0..avail_len].copy_from_slice(__input);
8120            Bytes::new(&payload_buf)
8121        } else {
8122            Bytes::new(__input)
8123        };
8124        let mut __struct = Self::default();
8125        __struct.point_x = buf.get_f32_le();
8126        __struct.point_y = buf.get_f32_le();
8127        __struct.radius = buf.get_f32_le();
8128        __struct.rec_top_x = buf.get_f32_le();
8129        __struct.rec_top_y = buf.get_f32_le();
8130        __struct.rec_bottom_x = buf.get_f32_le();
8131        __struct.rec_bottom_y = buf.get_f32_le();
8132        let tmp = buf.get_u8();
8133        __struct.tracking_status =
8134            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8135                enum_type: "CameraTrackingStatusFlags",
8136                value: tmp as u32,
8137            })?;
8138        let tmp = buf.get_u8();
8139        __struct.tracking_mode =
8140            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8141                enum_type: "CameraTrackingMode",
8142                value: tmp as u32,
8143            })?;
8144        let tmp = buf.get_u8();
8145        __struct.target_data =
8146            CameraTrackingTargetData::from_bits(tmp & CameraTrackingTargetData::all().bits())
8147                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
8148                    flag_type: "CameraTrackingTargetData",
8149                    value: tmp as u32,
8150                })?;
8151        __struct.camera_device_id = buf.get_u8();
8152        Ok(__struct)
8153    }
8154    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8155        let mut __tmp = BytesMut::new(bytes);
8156        #[allow(clippy::absurd_extreme_comparisons)]
8157        #[allow(unused_comparisons)]
8158        if __tmp.remaining() < Self::ENCODED_LEN {
8159            panic!(
8160                "buffer is too small (need {} bytes, but got {})",
8161                Self::ENCODED_LEN,
8162                __tmp.remaining(),
8163            )
8164        }
8165        __tmp.put_f32_le(self.point_x);
8166        __tmp.put_f32_le(self.point_y);
8167        __tmp.put_f32_le(self.radius);
8168        __tmp.put_f32_le(self.rec_top_x);
8169        __tmp.put_f32_le(self.rec_top_y);
8170        __tmp.put_f32_le(self.rec_bottom_x);
8171        __tmp.put_f32_le(self.rec_bottom_y);
8172        __tmp.put_u8(self.tracking_status as u8);
8173        __tmp.put_u8(self.tracking_mode as u8);
8174        __tmp.put_u8(self.target_data.bits());
8175        if matches!(version, MavlinkVersion::V2) {
8176            __tmp.put_u8(self.camera_device_id);
8177            let len = __tmp.len();
8178            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8179        } else {
8180            __tmp.len()
8181        }
8182    }
8183}
8184#[doc = "Camera-IMU triggering and synchronisation message."]
8185#[doc = ""]
8186#[doc = "ID: 112"]
8187#[derive(Debug, Clone, PartialEq)]
8188#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8189#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8190pub struct CAMERA_TRIGGER_DATA {
8191    #[doc = "Timestamp for image frame (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
8192    pub time_usec: u64,
8193    #[doc = "Image frame sequence"]
8194    pub seq: u32,
8195}
8196impl CAMERA_TRIGGER_DATA {
8197    pub const ENCODED_LEN: usize = 12usize;
8198    pub const DEFAULT: Self = Self {
8199        time_usec: 0_u64,
8200        seq: 0_u32,
8201    };
8202    #[cfg(feature = "arbitrary")]
8203    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8204        use arbitrary::{Arbitrary, Unstructured};
8205        let mut buf = [0u8; 1024];
8206        rng.fill_bytes(&mut buf);
8207        let mut unstructured = Unstructured::new(&buf);
8208        Self::arbitrary(&mut unstructured).unwrap_or_default()
8209    }
8210}
8211impl Default for CAMERA_TRIGGER_DATA {
8212    fn default() -> Self {
8213        Self::DEFAULT.clone()
8214    }
8215}
8216impl MessageData for CAMERA_TRIGGER_DATA {
8217    type Message = MavMessage;
8218    const ID: u32 = 112u32;
8219    const NAME: &'static str = "CAMERA_TRIGGER";
8220    const EXTRA_CRC: u8 = 174u8;
8221    const ENCODED_LEN: usize = 12usize;
8222    fn deser(
8223        _version: MavlinkVersion,
8224        __input: &[u8],
8225    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8226        let avail_len = __input.len();
8227        let mut payload_buf = [0; Self::ENCODED_LEN];
8228        let mut buf = if avail_len < Self::ENCODED_LEN {
8229            payload_buf[0..avail_len].copy_from_slice(__input);
8230            Bytes::new(&payload_buf)
8231        } else {
8232            Bytes::new(__input)
8233        };
8234        let mut __struct = Self::default();
8235        __struct.time_usec = buf.get_u64_le();
8236        __struct.seq = buf.get_u32_le();
8237        Ok(__struct)
8238    }
8239    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8240        let mut __tmp = BytesMut::new(bytes);
8241        #[allow(clippy::absurd_extreme_comparisons)]
8242        #[allow(unused_comparisons)]
8243        if __tmp.remaining() < Self::ENCODED_LEN {
8244            panic!(
8245                "buffer is too small (need {} bytes, but got {})",
8246                Self::ENCODED_LEN,
8247                __tmp.remaining(),
8248            )
8249        }
8250        __tmp.put_u64_le(self.time_usec);
8251        __tmp.put_u32_le(self.seq);
8252        if matches!(version, MavlinkVersion::V2) {
8253            let len = __tmp.len();
8254            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8255        } else {
8256            __tmp.len()
8257        }
8258    }
8259}
8260#[doc = "A forwarded CANFD frame as requested by MAV_CMD_CAN_FORWARD. These are separated from CAN_FRAME as they need different handling (eg. TAO handling)."]
8261#[doc = ""]
8262#[doc = "ID: 387"]
8263#[derive(Debug, Clone, PartialEq)]
8264#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8265#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8266pub struct CANFD_FRAME_DATA {
8267    #[doc = "Frame ID"]
8268    pub id: u32,
8269    #[doc = "System ID."]
8270    pub target_system: u8,
8271    #[doc = "Component ID."]
8272    pub target_component: u8,
8273    #[doc = "bus number"]
8274    pub bus: u8,
8275    #[doc = "Frame length"]
8276    pub len: u8,
8277    #[doc = "Frame data"]
8278    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8279    pub data: [u8; 64],
8280}
8281impl CANFD_FRAME_DATA {
8282    pub const ENCODED_LEN: usize = 72usize;
8283    pub const DEFAULT: Self = Self {
8284        id: 0_u32,
8285        target_system: 0_u8,
8286        target_component: 0_u8,
8287        bus: 0_u8,
8288        len: 0_u8,
8289        data: [0_u8; 64usize],
8290    };
8291    #[cfg(feature = "arbitrary")]
8292    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8293        use arbitrary::{Arbitrary, Unstructured};
8294        let mut buf = [0u8; 1024];
8295        rng.fill_bytes(&mut buf);
8296        let mut unstructured = Unstructured::new(&buf);
8297        Self::arbitrary(&mut unstructured).unwrap_or_default()
8298    }
8299}
8300impl Default for CANFD_FRAME_DATA {
8301    fn default() -> Self {
8302        Self::DEFAULT.clone()
8303    }
8304}
8305impl MessageData for CANFD_FRAME_DATA {
8306    type Message = MavMessage;
8307    const ID: u32 = 387u32;
8308    const NAME: &'static str = "CANFD_FRAME";
8309    const EXTRA_CRC: u8 = 4u8;
8310    const ENCODED_LEN: usize = 72usize;
8311    fn deser(
8312        _version: MavlinkVersion,
8313        __input: &[u8],
8314    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8315        let avail_len = __input.len();
8316        let mut payload_buf = [0; Self::ENCODED_LEN];
8317        let mut buf = if avail_len < Self::ENCODED_LEN {
8318            payload_buf[0..avail_len].copy_from_slice(__input);
8319            Bytes::new(&payload_buf)
8320        } else {
8321            Bytes::new(__input)
8322        };
8323        let mut __struct = Self::default();
8324        __struct.id = buf.get_u32_le();
8325        __struct.target_system = buf.get_u8();
8326        __struct.target_component = buf.get_u8();
8327        __struct.bus = buf.get_u8();
8328        __struct.len = buf.get_u8();
8329        for v in &mut __struct.data {
8330            let val = buf.get_u8();
8331            *v = val;
8332        }
8333        Ok(__struct)
8334    }
8335    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8336        let mut __tmp = BytesMut::new(bytes);
8337        #[allow(clippy::absurd_extreme_comparisons)]
8338        #[allow(unused_comparisons)]
8339        if __tmp.remaining() < Self::ENCODED_LEN {
8340            panic!(
8341                "buffer is too small (need {} bytes, but got {})",
8342                Self::ENCODED_LEN,
8343                __tmp.remaining(),
8344            )
8345        }
8346        __tmp.put_u32_le(self.id);
8347        __tmp.put_u8(self.target_system);
8348        __tmp.put_u8(self.target_component);
8349        __tmp.put_u8(self.bus);
8350        __tmp.put_u8(self.len);
8351        for val in &self.data {
8352            __tmp.put_u8(*val);
8353        }
8354        if matches!(version, MavlinkVersion::V2) {
8355            let len = __tmp.len();
8356            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8357        } else {
8358            __tmp.len()
8359        }
8360    }
8361}
8362#[doc = "Modify the filter of what CAN messages to forward over the mavlink. This can be used to make CAN forwarding work well on low bandwidth links. The filtering is applied on bits 8 to 24 of the CAN id (2nd and 3rd bytes) which corresponds to the DroneCAN message ID for DroneCAN. Filters with more than 16 IDs can be constructed by sending multiple CAN_FILTER_MODIFY messages."]
8363#[doc = ""]
8364#[doc = "ID: 388"]
8365#[derive(Debug, Clone, PartialEq)]
8366#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8367#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8368pub struct CAN_FILTER_MODIFY_DATA {
8369    #[doc = "filter IDs, length num_ids"]
8370    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8371    pub ids: [u16; 16],
8372    #[doc = "System ID."]
8373    pub target_system: u8,
8374    #[doc = "Component ID."]
8375    pub target_component: u8,
8376    #[doc = "bus number"]
8377    pub bus: u8,
8378    #[doc = "what operation to perform on the filter list. See CAN_FILTER_OP enum."]
8379    pub operation: CanFilterOp,
8380    #[doc = "number of IDs in filter list"]
8381    pub num_ids: u8,
8382}
8383impl CAN_FILTER_MODIFY_DATA {
8384    pub const ENCODED_LEN: usize = 37usize;
8385    pub const DEFAULT: Self = Self {
8386        ids: [0_u16; 16usize],
8387        target_system: 0_u8,
8388        target_component: 0_u8,
8389        bus: 0_u8,
8390        operation: CanFilterOp::DEFAULT,
8391        num_ids: 0_u8,
8392    };
8393    #[cfg(feature = "arbitrary")]
8394    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8395        use arbitrary::{Arbitrary, Unstructured};
8396        let mut buf = [0u8; 1024];
8397        rng.fill_bytes(&mut buf);
8398        let mut unstructured = Unstructured::new(&buf);
8399        Self::arbitrary(&mut unstructured).unwrap_or_default()
8400    }
8401}
8402impl Default for CAN_FILTER_MODIFY_DATA {
8403    fn default() -> Self {
8404        Self::DEFAULT.clone()
8405    }
8406}
8407impl MessageData for CAN_FILTER_MODIFY_DATA {
8408    type Message = MavMessage;
8409    const ID: u32 = 388u32;
8410    const NAME: &'static str = "CAN_FILTER_MODIFY";
8411    const EXTRA_CRC: u8 = 8u8;
8412    const ENCODED_LEN: usize = 37usize;
8413    fn deser(
8414        _version: MavlinkVersion,
8415        __input: &[u8],
8416    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8417        let avail_len = __input.len();
8418        let mut payload_buf = [0; Self::ENCODED_LEN];
8419        let mut buf = if avail_len < Self::ENCODED_LEN {
8420            payload_buf[0..avail_len].copy_from_slice(__input);
8421            Bytes::new(&payload_buf)
8422        } else {
8423            Bytes::new(__input)
8424        };
8425        let mut __struct = Self::default();
8426        for v in &mut __struct.ids {
8427            let val = buf.get_u16_le();
8428            *v = val;
8429        }
8430        __struct.target_system = buf.get_u8();
8431        __struct.target_component = buf.get_u8();
8432        __struct.bus = buf.get_u8();
8433        let tmp = buf.get_u8();
8434        __struct.operation =
8435            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8436                enum_type: "CanFilterOp",
8437                value: tmp as u32,
8438            })?;
8439        __struct.num_ids = buf.get_u8();
8440        Ok(__struct)
8441    }
8442    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8443        let mut __tmp = BytesMut::new(bytes);
8444        #[allow(clippy::absurd_extreme_comparisons)]
8445        #[allow(unused_comparisons)]
8446        if __tmp.remaining() < Self::ENCODED_LEN {
8447            panic!(
8448                "buffer is too small (need {} bytes, but got {})",
8449                Self::ENCODED_LEN,
8450                __tmp.remaining(),
8451            )
8452        }
8453        for val in &self.ids {
8454            __tmp.put_u16_le(*val);
8455        }
8456        __tmp.put_u8(self.target_system);
8457        __tmp.put_u8(self.target_component);
8458        __tmp.put_u8(self.bus);
8459        __tmp.put_u8(self.operation as u8);
8460        __tmp.put_u8(self.num_ids);
8461        if matches!(version, MavlinkVersion::V2) {
8462            let len = __tmp.len();
8463            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8464        } else {
8465            __tmp.len()
8466        }
8467    }
8468}
8469#[doc = "A forwarded CAN frame as requested by MAV_CMD_CAN_FORWARD."]
8470#[doc = ""]
8471#[doc = "ID: 386"]
8472#[derive(Debug, Clone, PartialEq)]
8473#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8474#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8475pub struct CAN_FRAME_DATA {
8476    #[doc = "Frame ID"]
8477    pub id: u32,
8478    #[doc = "System ID."]
8479    pub target_system: u8,
8480    #[doc = "Component ID."]
8481    pub target_component: u8,
8482    #[doc = "Bus number"]
8483    pub bus: u8,
8484    #[doc = "Frame length"]
8485    pub len: u8,
8486    #[doc = "Frame data"]
8487    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8488    pub data: [u8; 8],
8489}
8490impl CAN_FRAME_DATA {
8491    pub const ENCODED_LEN: usize = 16usize;
8492    pub const DEFAULT: Self = Self {
8493        id: 0_u32,
8494        target_system: 0_u8,
8495        target_component: 0_u8,
8496        bus: 0_u8,
8497        len: 0_u8,
8498        data: [0_u8; 8usize],
8499    };
8500    #[cfg(feature = "arbitrary")]
8501    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8502        use arbitrary::{Arbitrary, Unstructured};
8503        let mut buf = [0u8; 1024];
8504        rng.fill_bytes(&mut buf);
8505        let mut unstructured = Unstructured::new(&buf);
8506        Self::arbitrary(&mut unstructured).unwrap_or_default()
8507    }
8508}
8509impl Default for CAN_FRAME_DATA {
8510    fn default() -> Self {
8511        Self::DEFAULT.clone()
8512    }
8513}
8514impl MessageData for CAN_FRAME_DATA {
8515    type Message = MavMessage;
8516    const ID: u32 = 386u32;
8517    const NAME: &'static str = "CAN_FRAME";
8518    const EXTRA_CRC: u8 = 132u8;
8519    const ENCODED_LEN: usize = 16usize;
8520    fn deser(
8521        _version: MavlinkVersion,
8522        __input: &[u8],
8523    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8524        let avail_len = __input.len();
8525        let mut payload_buf = [0; Self::ENCODED_LEN];
8526        let mut buf = if avail_len < Self::ENCODED_LEN {
8527            payload_buf[0..avail_len].copy_from_slice(__input);
8528            Bytes::new(&payload_buf)
8529        } else {
8530            Bytes::new(__input)
8531        };
8532        let mut __struct = Self::default();
8533        __struct.id = buf.get_u32_le();
8534        __struct.target_system = buf.get_u8();
8535        __struct.target_component = buf.get_u8();
8536        __struct.bus = buf.get_u8();
8537        __struct.len = buf.get_u8();
8538        for v in &mut __struct.data {
8539            let val = buf.get_u8();
8540            *v = val;
8541        }
8542        Ok(__struct)
8543    }
8544    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8545        let mut __tmp = BytesMut::new(bytes);
8546        #[allow(clippy::absurd_extreme_comparisons)]
8547        #[allow(unused_comparisons)]
8548        if __tmp.remaining() < Self::ENCODED_LEN {
8549            panic!(
8550                "buffer is too small (need {} bytes, but got {})",
8551                Self::ENCODED_LEN,
8552                __tmp.remaining(),
8553            )
8554        }
8555        __tmp.put_u32_le(self.id);
8556        __tmp.put_u8(self.target_system);
8557        __tmp.put_u8(self.target_component);
8558        __tmp.put_u8(self.bus);
8559        __tmp.put_u8(self.len);
8560        for val in &self.data {
8561            __tmp.put_u8(*val);
8562        }
8563        if matches!(version, MavlinkVersion::V2) {
8564            let len = __tmp.len();
8565            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8566        } else {
8567            __tmp.len()
8568        }
8569    }
8570}
8571#[doc = "Configure cellular modems.         This message is re-emitted as an acknowledgement by the modem.         The message may also be explicitly requested using MAV_CMD_REQUEST_MESSAGE."]
8572#[doc = ""]
8573#[doc = "ID: 336"]
8574#[derive(Debug, Clone, PartialEq)]
8575#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8576#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8577pub struct CELLULAR_CONFIG_DATA {
8578    #[doc = "Enable/disable LTE. 0: setting unchanged, 1: disabled, 2: enabled. Current setting when sent back as a response."]
8579    pub enable_lte: u8,
8580    #[doc = "Enable/disable PIN on the SIM card. 0: setting unchanged, 1: disabled, 2: enabled. Current setting when sent back as a response."]
8581    pub enable_pin: u8,
8582    #[doc = "PIN sent to the SIM card. Blank when PIN is disabled. Empty when message is sent back as a response."]
8583    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8584    pub pin: [u8; 16],
8585    #[doc = "New PIN when changing the PIN. Blank to leave it unchanged. Empty when message is sent back as a response."]
8586    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8587    pub new_pin: [u8; 16],
8588    #[doc = "Name of the cellular APN. Blank to leave it unchanged. Current APN when sent back as a response."]
8589    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8590    pub apn: [u8; 32],
8591    #[doc = "Required PUK code in case the user failed to authenticate 3 times with the PIN. Empty when message is sent back as a response."]
8592    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8593    pub puk: [u8; 16],
8594    #[doc = "Enable/disable roaming. 0: setting unchanged, 1: disabled, 2: enabled. Current setting when sent back as a response."]
8595    pub roaming: u8,
8596    #[doc = "Message acceptance response (sent back to GS)."]
8597    pub response: CellularConfigResponse,
8598}
8599impl CELLULAR_CONFIG_DATA {
8600    pub const ENCODED_LEN: usize = 84usize;
8601    pub const DEFAULT: Self = Self {
8602        enable_lte: 0_u8,
8603        enable_pin: 0_u8,
8604        pin: [0_u8; 16usize],
8605        new_pin: [0_u8; 16usize],
8606        apn: [0_u8; 32usize],
8607        puk: [0_u8; 16usize],
8608        roaming: 0_u8,
8609        response: CellularConfigResponse::DEFAULT,
8610    };
8611    #[cfg(feature = "arbitrary")]
8612    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8613        use arbitrary::{Arbitrary, Unstructured};
8614        let mut buf = [0u8; 1024];
8615        rng.fill_bytes(&mut buf);
8616        let mut unstructured = Unstructured::new(&buf);
8617        Self::arbitrary(&mut unstructured).unwrap_or_default()
8618    }
8619}
8620impl Default for CELLULAR_CONFIG_DATA {
8621    fn default() -> Self {
8622        Self::DEFAULT.clone()
8623    }
8624}
8625impl MessageData for CELLULAR_CONFIG_DATA {
8626    type Message = MavMessage;
8627    const ID: u32 = 336u32;
8628    const NAME: &'static str = "CELLULAR_CONFIG";
8629    const EXTRA_CRC: u8 = 245u8;
8630    const ENCODED_LEN: usize = 84usize;
8631    fn deser(
8632        _version: MavlinkVersion,
8633        __input: &[u8],
8634    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8635        let avail_len = __input.len();
8636        let mut payload_buf = [0; Self::ENCODED_LEN];
8637        let mut buf = if avail_len < Self::ENCODED_LEN {
8638            payload_buf[0..avail_len].copy_from_slice(__input);
8639            Bytes::new(&payload_buf)
8640        } else {
8641            Bytes::new(__input)
8642        };
8643        let mut __struct = Self::default();
8644        __struct.enable_lte = buf.get_u8();
8645        __struct.enable_pin = buf.get_u8();
8646        for v in &mut __struct.pin {
8647            let val = buf.get_u8();
8648            *v = val;
8649        }
8650        for v in &mut __struct.new_pin {
8651            let val = buf.get_u8();
8652            *v = val;
8653        }
8654        for v in &mut __struct.apn {
8655            let val = buf.get_u8();
8656            *v = val;
8657        }
8658        for v in &mut __struct.puk {
8659            let val = buf.get_u8();
8660            *v = val;
8661        }
8662        __struct.roaming = buf.get_u8();
8663        let tmp = buf.get_u8();
8664        __struct.response =
8665            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8666                enum_type: "CellularConfigResponse",
8667                value: tmp as u32,
8668            })?;
8669        Ok(__struct)
8670    }
8671    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8672        let mut __tmp = BytesMut::new(bytes);
8673        #[allow(clippy::absurd_extreme_comparisons)]
8674        #[allow(unused_comparisons)]
8675        if __tmp.remaining() < Self::ENCODED_LEN {
8676            panic!(
8677                "buffer is too small (need {} bytes, but got {})",
8678                Self::ENCODED_LEN,
8679                __tmp.remaining(),
8680            )
8681        }
8682        __tmp.put_u8(self.enable_lte);
8683        __tmp.put_u8(self.enable_pin);
8684        for val in &self.pin {
8685            __tmp.put_u8(*val);
8686        }
8687        for val in &self.new_pin {
8688            __tmp.put_u8(*val);
8689        }
8690        for val in &self.apn {
8691            __tmp.put_u8(*val);
8692        }
8693        for val in &self.puk {
8694            __tmp.put_u8(*val);
8695        }
8696        __tmp.put_u8(self.roaming);
8697        __tmp.put_u8(self.response as u8);
8698        if matches!(version, MavlinkVersion::V2) {
8699            let len = __tmp.len();
8700            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8701        } else {
8702            __tmp.len()
8703        }
8704    }
8705}
8706#[doc = "Report current used cellular network status."]
8707#[doc = ""]
8708#[doc = "ID: 334"]
8709#[derive(Debug, Clone, PartialEq)]
8710#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8711#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8712pub struct CELLULAR_STATUS_DATA {
8713    #[doc = "Mobile country code. If unknown, set to UINT16_MAX"]
8714    pub mcc: u16,
8715    #[doc = "Mobile network code. If unknown, set to UINT16_MAX"]
8716    pub mnc: u16,
8717    #[doc = "Location area code. If unknown, set to 0"]
8718    pub lac: u16,
8719    #[doc = "Cellular modem status"]
8720    pub status: CellularStatusFlag,
8721    #[doc = "Failure reason when status in in CELLULAR_STATUS_FLAG_FAILED"]
8722    pub failure_reason: CellularNetworkFailedReason,
8723    #[doc = "Cellular network radio type: gsm, cdma, lte..."]
8724    pub mavtype: CellularNetworkRadioType,
8725    #[doc = "Signal quality in percent. If unknown, set to UINT8_MAX"]
8726    pub quality: u8,
8727}
8728impl CELLULAR_STATUS_DATA {
8729    pub const ENCODED_LEN: usize = 10usize;
8730    pub const DEFAULT: Self = Self {
8731        mcc: 0_u16,
8732        mnc: 0_u16,
8733        lac: 0_u16,
8734        status: CellularStatusFlag::DEFAULT,
8735        failure_reason: CellularNetworkFailedReason::DEFAULT,
8736        mavtype: CellularNetworkRadioType::DEFAULT,
8737        quality: 0_u8,
8738    };
8739    #[cfg(feature = "arbitrary")]
8740    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8741        use arbitrary::{Arbitrary, Unstructured};
8742        let mut buf = [0u8; 1024];
8743        rng.fill_bytes(&mut buf);
8744        let mut unstructured = Unstructured::new(&buf);
8745        Self::arbitrary(&mut unstructured).unwrap_or_default()
8746    }
8747}
8748impl Default for CELLULAR_STATUS_DATA {
8749    fn default() -> Self {
8750        Self::DEFAULT.clone()
8751    }
8752}
8753impl MessageData for CELLULAR_STATUS_DATA {
8754    type Message = MavMessage;
8755    const ID: u32 = 334u32;
8756    const NAME: &'static str = "CELLULAR_STATUS";
8757    const EXTRA_CRC: u8 = 72u8;
8758    const ENCODED_LEN: usize = 10usize;
8759    fn deser(
8760        _version: MavlinkVersion,
8761        __input: &[u8],
8762    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8763        let avail_len = __input.len();
8764        let mut payload_buf = [0; Self::ENCODED_LEN];
8765        let mut buf = if avail_len < Self::ENCODED_LEN {
8766            payload_buf[0..avail_len].copy_from_slice(__input);
8767            Bytes::new(&payload_buf)
8768        } else {
8769            Bytes::new(__input)
8770        };
8771        let mut __struct = Self::default();
8772        __struct.mcc = buf.get_u16_le();
8773        __struct.mnc = buf.get_u16_le();
8774        __struct.lac = buf.get_u16_le();
8775        let tmp = buf.get_u8();
8776        __struct.status =
8777            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8778                enum_type: "CellularStatusFlag",
8779                value: tmp as u32,
8780            })?;
8781        let tmp = buf.get_u8();
8782        __struct.failure_reason =
8783            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8784                enum_type: "CellularNetworkFailedReason",
8785                value: tmp as u32,
8786            })?;
8787        let tmp = buf.get_u8();
8788        __struct.mavtype =
8789            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8790                enum_type: "CellularNetworkRadioType",
8791                value: tmp as u32,
8792            })?;
8793        __struct.quality = buf.get_u8();
8794        Ok(__struct)
8795    }
8796    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8797        let mut __tmp = BytesMut::new(bytes);
8798        #[allow(clippy::absurd_extreme_comparisons)]
8799        #[allow(unused_comparisons)]
8800        if __tmp.remaining() < Self::ENCODED_LEN {
8801            panic!(
8802                "buffer is too small (need {} bytes, but got {})",
8803                Self::ENCODED_LEN,
8804                __tmp.remaining(),
8805            )
8806        }
8807        __tmp.put_u16_le(self.mcc);
8808        __tmp.put_u16_le(self.mnc);
8809        __tmp.put_u16_le(self.lac);
8810        __tmp.put_u8(self.status as u8);
8811        __tmp.put_u8(self.failure_reason as u8);
8812        __tmp.put_u8(self.mavtype as u8);
8813        __tmp.put_u8(self.quality);
8814        if matches!(version, MavlinkVersion::V2) {
8815            let len = __tmp.len();
8816            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8817        } else {
8818            __tmp.len()
8819        }
8820    }
8821}
8822#[doc = "Request to control this MAV."]
8823#[doc = ""]
8824#[doc = "ID: 5"]
8825#[derive(Debug, Clone, PartialEq)]
8826#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8827#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8828pub struct CHANGE_OPERATOR_CONTROL_DATA {
8829    #[doc = "System the GCS requests control for"]
8830    pub target_system: u8,
8831    #[doc = "0: request control of this MAV, 1: Release control of this MAV"]
8832    pub control_request: u8,
8833    #[doc = "0: key as plaintext, 1-255: future, different hashing/encryption variants. The GCS should in general use the safest mode possible initially and then gradually move down the encryption level if it gets a NACK message indicating an encryption mismatch."]
8834    pub version: u8,
8835    #[doc = "Password / Key, depending on version plaintext or encrypted. 25 or less characters, NULL terminated. The characters may involve A-Z, a-z, 0-9, and \"!?,.-\""]
8836    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8837    pub passkey: [u8; 25],
8838}
8839impl CHANGE_OPERATOR_CONTROL_DATA {
8840    pub const ENCODED_LEN: usize = 28usize;
8841    pub const DEFAULT: Self = Self {
8842        target_system: 0_u8,
8843        control_request: 0_u8,
8844        version: 0_u8,
8845        passkey: [0_u8; 25usize],
8846    };
8847    #[cfg(feature = "arbitrary")]
8848    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8849        use arbitrary::{Arbitrary, Unstructured};
8850        let mut buf = [0u8; 1024];
8851        rng.fill_bytes(&mut buf);
8852        let mut unstructured = Unstructured::new(&buf);
8853        Self::arbitrary(&mut unstructured).unwrap_or_default()
8854    }
8855}
8856impl Default for CHANGE_OPERATOR_CONTROL_DATA {
8857    fn default() -> Self {
8858        Self::DEFAULT.clone()
8859    }
8860}
8861impl MessageData for CHANGE_OPERATOR_CONTROL_DATA {
8862    type Message = MavMessage;
8863    const ID: u32 = 5u32;
8864    const NAME: &'static str = "CHANGE_OPERATOR_CONTROL";
8865    const EXTRA_CRC: u8 = 217u8;
8866    const ENCODED_LEN: usize = 28usize;
8867    fn deser(
8868        _version: MavlinkVersion,
8869        __input: &[u8],
8870    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8871        let avail_len = __input.len();
8872        let mut payload_buf = [0; Self::ENCODED_LEN];
8873        let mut buf = if avail_len < Self::ENCODED_LEN {
8874            payload_buf[0..avail_len].copy_from_slice(__input);
8875            Bytes::new(&payload_buf)
8876        } else {
8877            Bytes::new(__input)
8878        };
8879        let mut __struct = Self::default();
8880        __struct.target_system = buf.get_u8();
8881        __struct.control_request = buf.get_u8();
8882        __struct.version = buf.get_u8();
8883        for v in &mut __struct.passkey {
8884            let val = buf.get_u8();
8885            *v = val;
8886        }
8887        Ok(__struct)
8888    }
8889    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8890        let mut __tmp = BytesMut::new(bytes);
8891        #[allow(clippy::absurd_extreme_comparisons)]
8892        #[allow(unused_comparisons)]
8893        if __tmp.remaining() < Self::ENCODED_LEN {
8894            panic!(
8895                "buffer is too small (need {} bytes, but got {})",
8896                Self::ENCODED_LEN,
8897                __tmp.remaining(),
8898            )
8899        }
8900        __tmp.put_u8(self.target_system);
8901        __tmp.put_u8(self.control_request);
8902        __tmp.put_u8(self.version);
8903        for val in &self.passkey {
8904            __tmp.put_u8(*val);
8905        }
8906        if matches!(version, MavlinkVersion::V2) {
8907            let len = __tmp.len();
8908            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8909        } else {
8910            __tmp.len()
8911        }
8912    }
8913}
8914#[doc = "Accept / deny control of this MAV."]
8915#[doc = ""]
8916#[doc = "ID: 6"]
8917#[derive(Debug, Clone, PartialEq)]
8918#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8919#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8920pub struct CHANGE_OPERATOR_CONTROL_ACK_DATA {
8921    #[doc = "ID of the GCS this message"]
8922    pub gcs_system_id: u8,
8923    #[doc = "0: request control of this MAV, 1: Release control of this MAV"]
8924    pub control_request: u8,
8925    #[doc = "0: ACK, 1: NACK: Wrong passkey, 2: NACK: Unsupported passkey encryption method, 3: NACK: Already under control"]
8926    pub ack: u8,
8927}
8928impl CHANGE_OPERATOR_CONTROL_ACK_DATA {
8929    pub const ENCODED_LEN: usize = 3usize;
8930    pub const DEFAULT: Self = Self {
8931        gcs_system_id: 0_u8,
8932        control_request: 0_u8,
8933        ack: 0_u8,
8934    };
8935    #[cfg(feature = "arbitrary")]
8936    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8937        use arbitrary::{Arbitrary, Unstructured};
8938        let mut buf = [0u8; 1024];
8939        rng.fill_bytes(&mut buf);
8940        let mut unstructured = Unstructured::new(&buf);
8941        Self::arbitrary(&mut unstructured).unwrap_or_default()
8942    }
8943}
8944impl Default for CHANGE_OPERATOR_CONTROL_ACK_DATA {
8945    fn default() -> Self {
8946        Self::DEFAULT.clone()
8947    }
8948}
8949impl MessageData for CHANGE_OPERATOR_CONTROL_ACK_DATA {
8950    type Message = MavMessage;
8951    const ID: u32 = 6u32;
8952    const NAME: &'static str = "CHANGE_OPERATOR_CONTROL_ACK";
8953    const EXTRA_CRC: u8 = 104u8;
8954    const ENCODED_LEN: usize = 3usize;
8955    fn deser(
8956        _version: MavlinkVersion,
8957        __input: &[u8],
8958    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8959        let avail_len = __input.len();
8960        let mut payload_buf = [0; Self::ENCODED_LEN];
8961        let mut buf = if avail_len < Self::ENCODED_LEN {
8962            payload_buf[0..avail_len].copy_from_slice(__input);
8963            Bytes::new(&payload_buf)
8964        } else {
8965            Bytes::new(__input)
8966        };
8967        let mut __struct = Self::default();
8968        __struct.gcs_system_id = buf.get_u8();
8969        __struct.control_request = buf.get_u8();
8970        __struct.ack = buf.get_u8();
8971        Ok(__struct)
8972    }
8973    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8974        let mut __tmp = BytesMut::new(bytes);
8975        #[allow(clippy::absurd_extreme_comparisons)]
8976        #[allow(unused_comparisons)]
8977        if __tmp.remaining() < Self::ENCODED_LEN {
8978            panic!(
8979                "buffer is too small (need {} bytes, but got {})",
8980                Self::ENCODED_LEN,
8981                __tmp.remaining(),
8982            )
8983        }
8984        __tmp.put_u8(self.gcs_system_id);
8985        __tmp.put_u8(self.control_request);
8986        __tmp.put_u8(self.ack);
8987        if matches!(version, MavlinkVersion::V2) {
8988            let len = __tmp.len();
8989            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8990        } else {
8991            __tmp.len()
8992        }
8993    }
8994}
8995#[doc = "Information about a potential collision."]
8996#[doc = ""]
8997#[doc = "ID: 247"]
8998#[derive(Debug, Clone, PartialEq)]
8999#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9000#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9001pub struct COLLISION_DATA {
9002    #[doc = "Unique identifier, domain based on src field"]
9003    pub id: u32,
9004    #[doc = "Estimated time until collision occurs"]
9005    pub time_to_minimum_delta: f32,
9006    #[doc = "Closest vertical distance between vehicle and object"]
9007    pub altitude_minimum_delta: f32,
9008    #[doc = "Closest horizontal distance between vehicle and object"]
9009    pub horizontal_minimum_delta: f32,
9010    #[doc = "Collision data source"]
9011    pub src: MavCollisionSrc,
9012    #[doc = "Action that is being taken to avoid this collision"]
9013    pub action: MavCollisionAction,
9014    #[doc = "How concerned the aircraft is about this collision"]
9015    pub threat_level: MavCollisionThreatLevel,
9016}
9017impl COLLISION_DATA {
9018    pub const ENCODED_LEN: usize = 19usize;
9019    pub const DEFAULT: Self = Self {
9020        id: 0_u32,
9021        time_to_minimum_delta: 0.0_f32,
9022        altitude_minimum_delta: 0.0_f32,
9023        horizontal_minimum_delta: 0.0_f32,
9024        src: MavCollisionSrc::DEFAULT,
9025        action: MavCollisionAction::DEFAULT,
9026        threat_level: MavCollisionThreatLevel::DEFAULT,
9027    };
9028    #[cfg(feature = "arbitrary")]
9029    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9030        use arbitrary::{Arbitrary, Unstructured};
9031        let mut buf = [0u8; 1024];
9032        rng.fill_bytes(&mut buf);
9033        let mut unstructured = Unstructured::new(&buf);
9034        Self::arbitrary(&mut unstructured).unwrap_or_default()
9035    }
9036}
9037impl Default for COLLISION_DATA {
9038    fn default() -> Self {
9039        Self::DEFAULT.clone()
9040    }
9041}
9042impl MessageData for COLLISION_DATA {
9043    type Message = MavMessage;
9044    const ID: u32 = 247u32;
9045    const NAME: &'static str = "COLLISION";
9046    const EXTRA_CRC: u8 = 81u8;
9047    const ENCODED_LEN: usize = 19usize;
9048    fn deser(
9049        _version: MavlinkVersion,
9050        __input: &[u8],
9051    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9052        let avail_len = __input.len();
9053        let mut payload_buf = [0; Self::ENCODED_LEN];
9054        let mut buf = if avail_len < Self::ENCODED_LEN {
9055            payload_buf[0..avail_len].copy_from_slice(__input);
9056            Bytes::new(&payload_buf)
9057        } else {
9058            Bytes::new(__input)
9059        };
9060        let mut __struct = Self::default();
9061        __struct.id = buf.get_u32_le();
9062        __struct.time_to_minimum_delta = buf.get_f32_le();
9063        __struct.altitude_minimum_delta = buf.get_f32_le();
9064        __struct.horizontal_minimum_delta = buf.get_f32_le();
9065        let tmp = buf.get_u8();
9066        __struct.src =
9067            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9068                enum_type: "MavCollisionSrc",
9069                value: tmp as u32,
9070            })?;
9071        let tmp = buf.get_u8();
9072        __struct.action =
9073            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9074                enum_type: "MavCollisionAction",
9075                value: tmp as u32,
9076            })?;
9077        let tmp = buf.get_u8();
9078        __struct.threat_level =
9079            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9080                enum_type: "MavCollisionThreatLevel",
9081                value: tmp as u32,
9082            })?;
9083        Ok(__struct)
9084    }
9085    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9086        let mut __tmp = BytesMut::new(bytes);
9087        #[allow(clippy::absurd_extreme_comparisons)]
9088        #[allow(unused_comparisons)]
9089        if __tmp.remaining() < Self::ENCODED_LEN {
9090            panic!(
9091                "buffer is too small (need {} bytes, but got {})",
9092                Self::ENCODED_LEN,
9093                __tmp.remaining(),
9094            )
9095        }
9096        __tmp.put_u32_le(self.id);
9097        __tmp.put_f32_le(self.time_to_minimum_delta);
9098        __tmp.put_f32_le(self.altitude_minimum_delta);
9099        __tmp.put_f32_le(self.horizontal_minimum_delta);
9100        __tmp.put_u8(self.src as u8);
9101        __tmp.put_u8(self.action as u8);
9102        __tmp.put_u8(self.threat_level as u8);
9103        if matches!(version, MavlinkVersion::V2) {
9104            let len = __tmp.len();
9105            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9106        } else {
9107            __tmp.len()
9108        }
9109    }
9110}
9111#[doc = "Report status of a command. Includes feedback whether the command was executed. The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
9112#[doc = ""]
9113#[doc = "ID: 77"]
9114#[derive(Debug, Clone, PartialEq)]
9115#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9116#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9117pub struct COMMAND_ACK_DATA {
9118    #[doc = "Command ID (of acknowledged command)."]
9119    pub command: MavCmd,
9120    #[doc = "Result of command."]
9121    pub result: MavResult,
9122    #[doc = "The progress percentage when result is MAV_RESULT_IN_PROGRESS. Values: [0-100], or UINT8_MAX if the progress is unknown."]
9123    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
9124    pub progress: u8,
9125    #[doc = "Additional result information. Can be set with a command-specific enum containing command-specific error reasons for why the command might be denied. If used, the associated enum must be documented in the corresponding MAV_CMD (this enum should have a 0 value to indicate \"unused\" or \"unknown\")."]
9126    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
9127    pub result_param2: i32,
9128    #[doc = "System ID of the target recipient. This is the ID of the system that sent the command for which this COMMAND_ACK is an acknowledgement."]
9129    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
9130    pub target_system: u8,
9131    #[doc = "Component ID of the target recipient. This is the ID of the system that sent the command for which this COMMAND_ACK is an acknowledgement."]
9132    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
9133    pub target_component: u8,
9134}
9135impl COMMAND_ACK_DATA {
9136    pub const ENCODED_LEN: usize = 10usize;
9137    pub const DEFAULT: Self = Self {
9138        command: MavCmd::DEFAULT,
9139        result: MavResult::DEFAULT,
9140        progress: 0_u8,
9141        result_param2: 0_i32,
9142        target_system: 0_u8,
9143        target_component: 0_u8,
9144    };
9145    #[cfg(feature = "arbitrary")]
9146    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9147        use arbitrary::{Arbitrary, Unstructured};
9148        let mut buf = [0u8; 1024];
9149        rng.fill_bytes(&mut buf);
9150        let mut unstructured = Unstructured::new(&buf);
9151        Self::arbitrary(&mut unstructured).unwrap_or_default()
9152    }
9153}
9154impl Default for COMMAND_ACK_DATA {
9155    fn default() -> Self {
9156        Self::DEFAULT.clone()
9157    }
9158}
9159impl MessageData for COMMAND_ACK_DATA {
9160    type Message = MavMessage;
9161    const ID: u32 = 77u32;
9162    const NAME: &'static str = "COMMAND_ACK";
9163    const EXTRA_CRC: u8 = 143u8;
9164    const ENCODED_LEN: usize = 10usize;
9165    fn deser(
9166        _version: MavlinkVersion,
9167        __input: &[u8],
9168    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9169        let avail_len = __input.len();
9170        let mut payload_buf = [0; Self::ENCODED_LEN];
9171        let mut buf = if avail_len < Self::ENCODED_LEN {
9172            payload_buf[0..avail_len].copy_from_slice(__input);
9173            Bytes::new(&payload_buf)
9174        } else {
9175            Bytes::new(__input)
9176        };
9177        let mut __struct = Self::default();
9178        let tmp = buf.get_u16_le();
9179        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
9180            ::mavlink_core::error::ParserError::InvalidEnum {
9181                enum_type: "MavCmd",
9182                value: tmp as u32,
9183            },
9184        )?;
9185        let tmp = buf.get_u8();
9186        __struct.result =
9187            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9188                enum_type: "MavResult",
9189                value: tmp as u32,
9190            })?;
9191        __struct.progress = buf.get_u8();
9192        __struct.result_param2 = buf.get_i32_le();
9193        __struct.target_system = buf.get_u8();
9194        __struct.target_component = buf.get_u8();
9195        Ok(__struct)
9196    }
9197    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9198        let mut __tmp = BytesMut::new(bytes);
9199        #[allow(clippy::absurd_extreme_comparisons)]
9200        #[allow(unused_comparisons)]
9201        if __tmp.remaining() < Self::ENCODED_LEN {
9202            panic!(
9203                "buffer is too small (need {} bytes, but got {})",
9204                Self::ENCODED_LEN,
9205                __tmp.remaining(),
9206            )
9207        }
9208        __tmp.put_u16_le(self.command as u16);
9209        __tmp.put_u8(self.result as u8);
9210        if matches!(version, MavlinkVersion::V2) {
9211            __tmp.put_u8(self.progress);
9212            __tmp.put_i32_le(self.result_param2);
9213            __tmp.put_u8(self.target_system);
9214            __tmp.put_u8(self.target_component);
9215            let len = __tmp.len();
9216            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9217        } else {
9218            __tmp.len()
9219        }
9220    }
9221}
9222#[doc = "Cancel a long running command. The target system should respond with a COMMAND_ACK to the original command with result=MAV_RESULT_CANCELLED if the long running process was cancelled. If it has already completed, the cancel action can be ignored. The cancel action can be retried until some sort of acknowledgement to the original command has been received. The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
9223#[doc = ""]
9224#[doc = "ID: 80"]
9225#[derive(Debug, Clone, PartialEq)]
9226#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9227#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9228pub struct COMMAND_CANCEL_DATA {
9229    #[doc = "Command ID (of command to cancel)."]
9230    pub command: MavCmd,
9231    #[doc = "System executing long running command. Should not be broadcast (0)."]
9232    pub target_system: u8,
9233    #[doc = "Component executing long running command."]
9234    pub target_component: u8,
9235}
9236impl COMMAND_CANCEL_DATA {
9237    pub const ENCODED_LEN: usize = 4usize;
9238    pub const DEFAULT: Self = Self {
9239        command: MavCmd::DEFAULT,
9240        target_system: 0_u8,
9241        target_component: 0_u8,
9242    };
9243    #[cfg(feature = "arbitrary")]
9244    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9245        use arbitrary::{Arbitrary, Unstructured};
9246        let mut buf = [0u8; 1024];
9247        rng.fill_bytes(&mut buf);
9248        let mut unstructured = Unstructured::new(&buf);
9249        Self::arbitrary(&mut unstructured).unwrap_or_default()
9250    }
9251}
9252impl Default for COMMAND_CANCEL_DATA {
9253    fn default() -> Self {
9254        Self::DEFAULT.clone()
9255    }
9256}
9257impl MessageData for COMMAND_CANCEL_DATA {
9258    type Message = MavMessage;
9259    const ID: u32 = 80u32;
9260    const NAME: &'static str = "COMMAND_CANCEL";
9261    const EXTRA_CRC: u8 = 14u8;
9262    const ENCODED_LEN: usize = 4usize;
9263    fn deser(
9264        _version: MavlinkVersion,
9265        __input: &[u8],
9266    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9267        let avail_len = __input.len();
9268        let mut payload_buf = [0; Self::ENCODED_LEN];
9269        let mut buf = if avail_len < Self::ENCODED_LEN {
9270            payload_buf[0..avail_len].copy_from_slice(__input);
9271            Bytes::new(&payload_buf)
9272        } else {
9273            Bytes::new(__input)
9274        };
9275        let mut __struct = Self::default();
9276        let tmp = buf.get_u16_le();
9277        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
9278            ::mavlink_core::error::ParserError::InvalidEnum {
9279                enum_type: "MavCmd",
9280                value: tmp as u32,
9281            },
9282        )?;
9283        __struct.target_system = buf.get_u8();
9284        __struct.target_component = buf.get_u8();
9285        Ok(__struct)
9286    }
9287    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9288        let mut __tmp = BytesMut::new(bytes);
9289        #[allow(clippy::absurd_extreme_comparisons)]
9290        #[allow(unused_comparisons)]
9291        if __tmp.remaining() < Self::ENCODED_LEN {
9292            panic!(
9293                "buffer is too small (need {} bytes, but got {})",
9294                Self::ENCODED_LEN,
9295                __tmp.remaining(),
9296            )
9297        }
9298        __tmp.put_u16_le(self.command as u16);
9299        __tmp.put_u8(self.target_system);
9300        __tmp.put_u8(self.target_component);
9301        if matches!(version, MavlinkVersion::V2) {
9302            let len = __tmp.len();
9303            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9304        } else {
9305            __tmp.len()
9306        }
9307    }
9308}
9309#[doc = "Send a command with up to seven parameters to the MAV, where params 5 and 6 are integers and the other values are floats. This is preferred over COMMAND_LONG as it allows the MAV_FRAME to be specified for interpreting positional information, such as altitude. COMMAND_INT is also preferred when sending latitude and longitude data in params 5 and 6, as it allows for greater precision. Param 5 and 6 encode positional data as scaled integers, where the scaling depends on the actual command value. NaN or INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current latitude, yaw rather than a specific value). The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
9310#[doc = ""]
9311#[doc = "ID: 75"]
9312#[derive(Debug, Clone, PartialEq)]
9313#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9314#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9315pub struct COMMAND_INT_DATA {
9316    #[doc = "PARAM1, see MAV_CMD enum"]
9317    pub param1: f32,
9318    #[doc = "PARAM2, see MAV_CMD enum"]
9319    pub param2: f32,
9320    #[doc = "PARAM3, see MAV_CMD enum"]
9321    pub param3: f32,
9322    #[doc = "PARAM4, see MAV_CMD enum"]
9323    pub param4: f32,
9324    #[doc = "PARAM5 / local: x position in meters * 1e4, global: latitude in degrees * 10^7"]
9325    pub x: i32,
9326    #[doc = "PARAM6 / local: y position in meters * 1e4, global: longitude in degrees * 10^7"]
9327    pub y: i32,
9328    #[doc = "PARAM7 / z position: global: altitude in meters (relative or absolute, depending on frame)."]
9329    pub z: f32,
9330    #[doc = "The scheduled action for the mission item."]
9331    pub command: MavCmd,
9332    #[doc = "System ID"]
9333    pub target_system: u8,
9334    #[doc = "Component ID"]
9335    pub target_component: u8,
9336    #[doc = "The coordinate system of the COMMAND."]
9337    pub frame: MavFrame,
9338    #[doc = "Not used."]
9339    pub current: u8,
9340    #[doc = "Not used (set 0)."]
9341    pub autocontinue: u8,
9342}
9343impl COMMAND_INT_DATA {
9344    pub const ENCODED_LEN: usize = 35usize;
9345    pub const DEFAULT: Self = Self {
9346        param1: 0.0_f32,
9347        param2: 0.0_f32,
9348        param3: 0.0_f32,
9349        param4: 0.0_f32,
9350        x: 0_i32,
9351        y: 0_i32,
9352        z: 0.0_f32,
9353        command: MavCmd::DEFAULT,
9354        target_system: 0_u8,
9355        target_component: 0_u8,
9356        frame: MavFrame::DEFAULT,
9357        current: 0_u8,
9358        autocontinue: 0_u8,
9359    };
9360    #[cfg(feature = "arbitrary")]
9361    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9362        use arbitrary::{Arbitrary, Unstructured};
9363        let mut buf = [0u8; 1024];
9364        rng.fill_bytes(&mut buf);
9365        let mut unstructured = Unstructured::new(&buf);
9366        Self::arbitrary(&mut unstructured).unwrap_or_default()
9367    }
9368}
9369impl Default for COMMAND_INT_DATA {
9370    fn default() -> Self {
9371        Self::DEFAULT.clone()
9372    }
9373}
9374impl MessageData for COMMAND_INT_DATA {
9375    type Message = MavMessage;
9376    const ID: u32 = 75u32;
9377    const NAME: &'static str = "COMMAND_INT";
9378    const EXTRA_CRC: u8 = 158u8;
9379    const ENCODED_LEN: usize = 35usize;
9380    fn deser(
9381        _version: MavlinkVersion,
9382        __input: &[u8],
9383    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9384        let avail_len = __input.len();
9385        let mut payload_buf = [0; Self::ENCODED_LEN];
9386        let mut buf = if avail_len < Self::ENCODED_LEN {
9387            payload_buf[0..avail_len].copy_from_slice(__input);
9388            Bytes::new(&payload_buf)
9389        } else {
9390            Bytes::new(__input)
9391        };
9392        let mut __struct = Self::default();
9393        __struct.param1 = buf.get_f32_le();
9394        __struct.param2 = buf.get_f32_le();
9395        __struct.param3 = buf.get_f32_le();
9396        __struct.param4 = buf.get_f32_le();
9397        __struct.x = buf.get_i32_le();
9398        __struct.y = buf.get_i32_le();
9399        __struct.z = buf.get_f32_le();
9400        let tmp = buf.get_u16_le();
9401        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
9402            ::mavlink_core::error::ParserError::InvalidEnum {
9403                enum_type: "MavCmd",
9404                value: tmp as u32,
9405            },
9406        )?;
9407        __struct.target_system = buf.get_u8();
9408        __struct.target_component = buf.get_u8();
9409        let tmp = buf.get_u8();
9410        __struct.frame =
9411            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9412                enum_type: "MavFrame",
9413                value: tmp as u32,
9414            })?;
9415        __struct.current = buf.get_u8();
9416        __struct.autocontinue = buf.get_u8();
9417        Ok(__struct)
9418    }
9419    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9420        let mut __tmp = BytesMut::new(bytes);
9421        #[allow(clippy::absurd_extreme_comparisons)]
9422        #[allow(unused_comparisons)]
9423        if __tmp.remaining() < Self::ENCODED_LEN {
9424            panic!(
9425                "buffer is too small (need {} bytes, but got {})",
9426                Self::ENCODED_LEN,
9427                __tmp.remaining(),
9428            )
9429        }
9430        __tmp.put_f32_le(self.param1);
9431        __tmp.put_f32_le(self.param2);
9432        __tmp.put_f32_le(self.param3);
9433        __tmp.put_f32_le(self.param4);
9434        __tmp.put_i32_le(self.x);
9435        __tmp.put_i32_le(self.y);
9436        __tmp.put_f32_le(self.z);
9437        __tmp.put_u16_le(self.command as u16);
9438        __tmp.put_u8(self.target_system);
9439        __tmp.put_u8(self.target_component);
9440        __tmp.put_u8(self.frame as u8);
9441        __tmp.put_u8(self.current);
9442        __tmp.put_u8(self.autocontinue);
9443        if matches!(version, MavlinkVersion::V2) {
9444            let len = __tmp.len();
9445            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9446        } else {
9447            __tmp.len()
9448        }
9449    }
9450}
9451#[doc = "Message encoding a command with parameters as scaled integers and additional metadata. Scaling depends on the actual command value."]
9452#[doc = ""]
9453#[doc = "ID: 223"]
9454#[derive(Debug, Clone, PartialEq)]
9455#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9456#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9457pub struct COMMAND_INT_STAMPED_DATA {
9458    #[doc = "Microseconds elapsed since vehicle boot"]
9459    pub vehicle_timestamp: u64,
9460    #[doc = "UTC time, seconds elapsed since 01.01.1970"]
9461    pub utc_time: u32,
9462    #[doc = "PARAM1, see MAV_CMD enum"]
9463    pub param1: f32,
9464    #[doc = "PARAM2, see MAV_CMD enum"]
9465    pub param2: f32,
9466    #[doc = "PARAM3, see MAV_CMD enum"]
9467    pub param3: f32,
9468    #[doc = "PARAM4, see MAV_CMD enum"]
9469    pub param4: f32,
9470    #[doc = "PARAM5 / local: x position in meters * 1e4, global: latitude in degrees * 10^7"]
9471    pub x: i32,
9472    #[doc = "PARAM6 / local: y position in meters * 1e4, global: longitude in degrees * 10^7"]
9473    pub y: i32,
9474    #[doc = "PARAM7 / z position: global: altitude in meters (MSL, WGS84, AGL or relative to home - depending on frame)."]
9475    pub z: f32,
9476    #[doc = "The scheduled action for the mission item, as defined by MAV_CMD enum"]
9477    pub command: MavCmd,
9478    #[doc = "System ID"]
9479    pub target_system: u8,
9480    #[doc = "Component ID"]
9481    pub target_component: u8,
9482    #[doc = "The coordinate system of the COMMAND, as defined by MAV_FRAME enum"]
9483    pub frame: MavFrame,
9484    #[doc = "false:0, true:1"]
9485    pub current: u8,
9486    #[doc = "autocontinue to next wp"]
9487    pub autocontinue: u8,
9488}
9489impl COMMAND_INT_STAMPED_DATA {
9490    pub const ENCODED_LEN: usize = 47usize;
9491    pub const DEFAULT: Self = Self {
9492        vehicle_timestamp: 0_u64,
9493        utc_time: 0_u32,
9494        param1: 0.0_f32,
9495        param2: 0.0_f32,
9496        param3: 0.0_f32,
9497        param4: 0.0_f32,
9498        x: 0_i32,
9499        y: 0_i32,
9500        z: 0.0_f32,
9501        command: MavCmd::DEFAULT,
9502        target_system: 0_u8,
9503        target_component: 0_u8,
9504        frame: MavFrame::DEFAULT,
9505        current: 0_u8,
9506        autocontinue: 0_u8,
9507    };
9508    #[cfg(feature = "arbitrary")]
9509    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9510        use arbitrary::{Arbitrary, Unstructured};
9511        let mut buf = [0u8; 1024];
9512        rng.fill_bytes(&mut buf);
9513        let mut unstructured = Unstructured::new(&buf);
9514        Self::arbitrary(&mut unstructured).unwrap_or_default()
9515    }
9516}
9517impl Default for COMMAND_INT_STAMPED_DATA {
9518    fn default() -> Self {
9519        Self::DEFAULT.clone()
9520    }
9521}
9522impl MessageData for COMMAND_INT_STAMPED_DATA {
9523    type Message = MavMessage;
9524    const ID: u32 = 223u32;
9525    const NAME: &'static str = "COMMAND_INT_STAMPED";
9526    const EXTRA_CRC: u8 = 119u8;
9527    const ENCODED_LEN: usize = 47usize;
9528    fn deser(
9529        _version: MavlinkVersion,
9530        __input: &[u8],
9531    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9532        let avail_len = __input.len();
9533        let mut payload_buf = [0; Self::ENCODED_LEN];
9534        let mut buf = if avail_len < Self::ENCODED_LEN {
9535            payload_buf[0..avail_len].copy_from_slice(__input);
9536            Bytes::new(&payload_buf)
9537        } else {
9538            Bytes::new(__input)
9539        };
9540        let mut __struct = Self::default();
9541        __struct.vehicle_timestamp = buf.get_u64_le();
9542        __struct.utc_time = buf.get_u32_le();
9543        __struct.param1 = buf.get_f32_le();
9544        __struct.param2 = buf.get_f32_le();
9545        __struct.param3 = buf.get_f32_le();
9546        __struct.param4 = buf.get_f32_le();
9547        __struct.x = buf.get_i32_le();
9548        __struct.y = buf.get_i32_le();
9549        __struct.z = buf.get_f32_le();
9550        let tmp = buf.get_u16_le();
9551        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
9552            ::mavlink_core::error::ParserError::InvalidEnum {
9553                enum_type: "MavCmd",
9554                value: tmp as u32,
9555            },
9556        )?;
9557        __struct.target_system = buf.get_u8();
9558        __struct.target_component = buf.get_u8();
9559        let tmp = buf.get_u8();
9560        __struct.frame =
9561            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9562                enum_type: "MavFrame",
9563                value: tmp as u32,
9564            })?;
9565        __struct.current = buf.get_u8();
9566        __struct.autocontinue = buf.get_u8();
9567        Ok(__struct)
9568    }
9569    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9570        let mut __tmp = BytesMut::new(bytes);
9571        #[allow(clippy::absurd_extreme_comparisons)]
9572        #[allow(unused_comparisons)]
9573        if __tmp.remaining() < Self::ENCODED_LEN {
9574            panic!(
9575                "buffer is too small (need {} bytes, but got {})",
9576                Self::ENCODED_LEN,
9577                __tmp.remaining(),
9578            )
9579        }
9580        __tmp.put_u64_le(self.vehicle_timestamp);
9581        __tmp.put_u32_le(self.utc_time);
9582        __tmp.put_f32_le(self.param1);
9583        __tmp.put_f32_le(self.param2);
9584        __tmp.put_f32_le(self.param3);
9585        __tmp.put_f32_le(self.param4);
9586        __tmp.put_i32_le(self.x);
9587        __tmp.put_i32_le(self.y);
9588        __tmp.put_f32_le(self.z);
9589        __tmp.put_u16_le(self.command as u16);
9590        __tmp.put_u8(self.target_system);
9591        __tmp.put_u8(self.target_component);
9592        __tmp.put_u8(self.frame as u8);
9593        __tmp.put_u8(self.current);
9594        __tmp.put_u8(self.autocontinue);
9595        if matches!(version, MavlinkVersion::V2) {
9596            let len = __tmp.len();
9597            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9598        } else {
9599            __tmp.len()
9600        }
9601    }
9602}
9603#[doc = "Send a command with up to seven parameters to the MAV. COMMAND_INT is generally preferred when sending MAV_CMD commands that include positional information; it offers higher precision and allows the MAV_FRAME to be specified (which may otherwise be ambiguous, particularly for altitude). The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
9604#[doc = ""]
9605#[doc = "ID: 76"]
9606#[derive(Debug, Clone, PartialEq)]
9607#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9608#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9609pub struct COMMAND_LONG_DATA {
9610    #[doc = "Parameter 1 (for the specific command)."]
9611    pub param1: f32,
9612    #[doc = "Parameter 2 (for the specific command)."]
9613    pub param2: f32,
9614    #[doc = "Parameter 3 (for the specific command)."]
9615    pub param3: f32,
9616    #[doc = "Parameter 4 (for the specific command)."]
9617    pub param4: f32,
9618    #[doc = "Parameter 5 (for the specific command)."]
9619    pub param5: f32,
9620    #[doc = "Parameter 6 (for the specific command)."]
9621    pub param6: f32,
9622    #[doc = "Parameter 7 (for the specific command)."]
9623    pub param7: f32,
9624    #[doc = "Command ID (of command to send)."]
9625    pub command: MavCmd,
9626    #[doc = "System which should execute the command"]
9627    pub target_system: u8,
9628    #[doc = "Component which should execute the command, 0 for all components"]
9629    pub target_component: u8,
9630    #[doc = "0: First transmission of this command. 1-255: Confirmation transmissions (e.g. for kill command)"]
9631    pub confirmation: u8,
9632}
9633impl COMMAND_LONG_DATA {
9634    pub const ENCODED_LEN: usize = 33usize;
9635    pub const DEFAULT: Self = Self {
9636        param1: 0.0_f32,
9637        param2: 0.0_f32,
9638        param3: 0.0_f32,
9639        param4: 0.0_f32,
9640        param5: 0.0_f32,
9641        param6: 0.0_f32,
9642        param7: 0.0_f32,
9643        command: MavCmd::DEFAULT,
9644        target_system: 0_u8,
9645        target_component: 0_u8,
9646        confirmation: 0_u8,
9647    };
9648    #[cfg(feature = "arbitrary")]
9649    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9650        use arbitrary::{Arbitrary, Unstructured};
9651        let mut buf = [0u8; 1024];
9652        rng.fill_bytes(&mut buf);
9653        let mut unstructured = Unstructured::new(&buf);
9654        Self::arbitrary(&mut unstructured).unwrap_or_default()
9655    }
9656}
9657impl Default for COMMAND_LONG_DATA {
9658    fn default() -> Self {
9659        Self::DEFAULT.clone()
9660    }
9661}
9662impl MessageData for COMMAND_LONG_DATA {
9663    type Message = MavMessage;
9664    const ID: u32 = 76u32;
9665    const NAME: &'static str = "COMMAND_LONG";
9666    const EXTRA_CRC: u8 = 152u8;
9667    const ENCODED_LEN: usize = 33usize;
9668    fn deser(
9669        _version: MavlinkVersion,
9670        __input: &[u8],
9671    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9672        let avail_len = __input.len();
9673        let mut payload_buf = [0; Self::ENCODED_LEN];
9674        let mut buf = if avail_len < Self::ENCODED_LEN {
9675            payload_buf[0..avail_len].copy_from_slice(__input);
9676            Bytes::new(&payload_buf)
9677        } else {
9678            Bytes::new(__input)
9679        };
9680        let mut __struct = Self::default();
9681        __struct.param1 = buf.get_f32_le();
9682        __struct.param2 = buf.get_f32_le();
9683        __struct.param3 = buf.get_f32_le();
9684        __struct.param4 = buf.get_f32_le();
9685        __struct.param5 = buf.get_f32_le();
9686        __struct.param6 = buf.get_f32_le();
9687        __struct.param7 = buf.get_f32_le();
9688        let tmp = buf.get_u16_le();
9689        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
9690            ::mavlink_core::error::ParserError::InvalidEnum {
9691                enum_type: "MavCmd",
9692                value: tmp as u32,
9693            },
9694        )?;
9695        __struct.target_system = buf.get_u8();
9696        __struct.target_component = buf.get_u8();
9697        __struct.confirmation = buf.get_u8();
9698        Ok(__struct)
9699    }
9700    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9701        let mut __tmp = BytesMut::new(bytes);
9702        #[allow(clippy::absurd_extreme_comparisons)]
9703        #[allow(unused_comparisons)]
9704        if __tmp.remaining() < Self::ENCODED_LEN {
9705            panic!(
9706                "buffer is too small (need {} bytes, but got {})",
9707                Self::ENCODED_LEN,
9708                __tmp.remaining(),
9709            )
9710        }
9711        __tmp.put_f32_le(self.param1);
9712        __tmp.put_f32_le(self.param2);
9713        __tmp.put_f32_le(self.param3);
9714        __tmp.put_f32_le(self.param4);
9715        __tmp.put_f32_le(self.param5);
9716        __tmp.put_f32_le(self.param6);
9717        __tmp.put_f32_le(self.param7);
9718        __tmp.put_u16_le(self.command as u16);
9719        __tmp.put_u8(self.target_system);
9720        __tmp.put_u8(self.target_component);
9721        __tmp.put_u8(self.confirmation);
9722        if matches!(version, MavlinkVersion::V2) {
9723            let len = __tmp.len();
9724            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9725        } else {
9726            __tmp.len()
9727        }
9728    }
9729}
9730#[doc = "Send a command with up to seven parameters to the MAV and additional metadata."]
9731#[doc = ""]
9732#[doc = "ID: 224"]
9733#[derive(Debug, Clone, PartialEq)]
9734#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9735#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9736pub struct COMMAND_LONG_STAMPED_DATA {
9737    #[doc = "Microseconds elapsed since vehicle boot"]
9738    pub vehicle_timestamp: u64,
9739    #[doc = "UTC time, seconds elapsed since 01.01.1970"]
9740    pub utc_time: u32,
9741    #[doc = "Parameter 1, as defined by MAV_CMD enum."]
9742    pub param1: f32,
9743    #[doc = "Parameter 2, as defined by MAV_CMD enum."]
9744    pub param2: f32,
9745    #[doc = "Parameter 3, as defined by MAV_CMD enum."]
9746    pub param3: f32,
9747    #[doc = "Parameter 4, as defined by MAV_CMD enum."]
9748    pub param4: f32,
9749    #[doc = "Parameter 5, as defined by MAV_CMD enum."]
9750    pub param5: f32,
9751    #[doc = "Parameter 6, as defined by MAV_CMD enum."]
9752    pub param6: f32,
9753    #[doc = "Parameter 7, as defined by MAV_CMD enum."]
9754    pub param7: f32,
9755    #[doc = "Command ID, as defined by MAV_CMD enum."]
9756    pub command: MavCmd,
9757    #[doc = "System which should execute the command"]
9758    pub target_system: u8,
9759    #[doc = "Component which should execute the command, 0 for all components"]
9760    pub target_component: u8,
9761    #[doc = "0: First transmission of this command. 1-255: Confirmation transmissions (e.g. for kill command)"]
9762    pub confirmation: u8,
9763}
9764impl COMMAND_LONG_STAMPED_DATA {
9765    pub const ENCODED_LEN: usize = 45usize;
9766    pub const DEFAULT: Self = Self {
9767        vehicle_timestamp: 0_u64,
9768        utc_time: 0_u32,
9769        param1: 0.0_f32,
9770        param2: 0.0_f32,
9771        param3: 0.0_f32,
9772        param4: 0.0_f32,
9773        param5: 0.0_f32,
9774        param6: 0.0_f32,
9775        param7: 0.0_f32,
9776        command: MavCmd::DEFAULT,
9777        target_system: 0_u8,
9778        target_component: 0_u8,
9779        confirmation: 0_u8,
9780    };
9781    #[cfg(feature = "arbitrary")]
9782    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9783        use arbitrary::{Arbitrary, Unstructured};
9784        let mut buf = [0u8; 1024];
9785        rng.fill_bytes(&mut buf);
9786        let mut unstructured = Unstructured::new(&buf);
9787        Self::arbitrary(&mut unstructured).unwrap_or_default()
9788    }
9789}
9790impl Default for COMMAND_LONG_STAMPED_DATA {
9791    fn default() -> Self {
9792        Self::DEFAULT.clone()
9793    }
9794}
9795impl MessageData for COMMAND_LONG_STAMPED_DATA {
9796    type Message = MavMessage;
9797    const ID: u32 = 224u32;
9798    const NAME: &'static str = "COMMAND_LONG_STAMPED";
9799    const EXTRA_CRC: u8 = 102u8;
9800    const ENCODED_LEN: usize = 45usize;
9801    fn deser(
9802        _version: MavlinkVersion,
9803        __input: &[u8],
9804    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9805        let avail_len = __input.len();
9806        let mut payload_buf = [0; Self::ENCODED_LEN];
9807        let mut buf = if avail_len < Self::ENCODED_LEN {
9808            payload_buf[0..avail_len].copy_from_slice(__input);
9809            Bytes::new(&payload_buf)
9810        } else {
9811            Bytes::new(__input)
9812        };
9813        let mut __struct = Self::default();
9814        __struct.vehicle_timestamp = buf.get_u64_le();
9815        __struct.utc_time = buf.get_u32_le();
9816        __struct.param1 = buf.get_f32_le();
9817        __struct.param2 = buf.get_f32_le();
9818        __struct.param3 = buf.get_f32_le();
9819        __struct.param4 = buf.get_f32_le();
9820        __struct.param5 = buf.get_f32_le();
9821        __struct.param6 = buf.get_f32_le();
9822        __struct.param7 = buf.get_f32_le();
9823        let tmp = buf.get_u16_le();
9824        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
9825            ::mavlink_core::error::ParserError::InvalidEnum {
9826                enum_type: "MavCmd",
9827                value: tmp as u32,
9828            },
9829        )?;
9830        __struct.target_system = buf.get_u8();
9831        __struct.target_component = buf.get_u8();
9832        __struct.confirmation = buf.get_u8();
9833        Ok(__struct)
9834    }
9835    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9836        let mut __tmp = BytesMut::new(bytes);
9837        #[allow(clippy::absurd_extreme_comparisons)]
9838        #[allow(unused_comparisons)]
9839        if __tmp.remaining() < Self::ENCODED_LEN {
9840            panic!(
9841                "buffer is too small (need {} bytes, but got {})",
9842                Self::ENCODED_LEN,
9843                __tmp.remaining(),
9844            )
9845        }
9846        __tmp.put_u64_le(self.vehicle_timestamp);
9847        __tmp.put_u32_le(self.utc_time);
9848        __tmp.put_f32_le(self.param1);
9849        __tmp.put_f32_le(self.param2);
9850        __tmp.put_f32_le(self.param3);
9851        __tmp.put_f32_le(self.param4);
9852        __tmp.put_f32_le(self.param5);
9853        __tmp.put_f32_le(self.param6);
9854        __tmp.put_f32_le(self.param7);
9855        __tmp.put_u16_le(self.command as u16);
9856        __tmp.put_u8(self.target_system);
9857        __tmp.put_u8(self.target_component);
9858        __tmp.put_u8(self.confirmation);
9859        if matches!(version, MavlinkVersion::V2) {
9860            let len = __tmp.len();
9861            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9862        } else {
9863            __tmp.len()
9864        }
9865    }
9866}
9867#[deprecated = " See `COMPONENT_METADATA` (Deprecated since 2022-04)"]
9868#[doc = "Component information message, which may be requested using MAV_CMD_REQUEST_MESSAGE."]
9869#[doc = ""]
9870#[doc = "ID: 395"]
9871#[derive(Debug, Clone, PartialEq)]
9872#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9873#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9874pub struct COMPONENT_INFORMATION_DATA {
9875    #[doc = "Timestamp (time since system boot)."]
9876    pub time_boot_ms: u32,
9877    #[doc = "CRC32 of the general metadata file (general_metadata_uri)."]
9878    pub general_metadata_file_crc: u32,
9879    #[doc = "CRC32 of peripherals metadata file (peripherals_metadata_uri)."]
9880    pub peripherals_metadata_file_crc: u32,
9881    #[doc = "MAVLink FTP URI for the general metadata file (COMP_METADATA_TYPE_GENERAL), which may be compressed with xz. The file contains general component metadata, and may contain URI links for additional metadata (see COMP_METADATA_TYPE). The information is static from boot, and may be generated at compile time. The string needs to be zero terminated."]
9882    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9883    pub general_metadata_uri: [u8; 100],
9884    #[doc = "(Optional) MAVLink FTP URI for the peripherals metadata file (COMP_METADATA_TYPE_PERIPHERALS), which may be compressed with xz. This contains data about \"attached components\" such as UAVCAN nodes. The peripherals are in a separate file because the information must be generated dynamically at runtime. The string needs to be zero terminated."]
9885    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9886    pub peripherals_metadata_uri: [u8; 100],
9887}
9888impl COMPONENT_INFORMATION_DATA {
9889    pub const ENCODED_LEN: usize = 212usize;
9890    pub const DEFAULT: Self = Self {
9891        time_boot_ms: 0_u32,
9892        general_metadata_file_crc: 0_u32,
9893        peripherals_metadata_file_crc: 0_u32,
9894        general_metadata_uri: [0_u8; 100usize],
9895        peripherals_metadata_uri: [0_u8; 100usize],
9896    };
9897    #[cfg(feature = "arbitrary")]
9898    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9899        use arbitrary::{Arbitrary, Unstructured};
9900        let mut buf = [0u8; 1024];
9901        rng.fill_bytes(&mut buf);
9902        let mut unstructured = Unstructured::new(&buf);
9903        Self::arbitrary(&mut unstructured).unwrap_or_default()
9904    }
9905}
9906impl Default for COMPONENT_INFORMATION_DATA {
9907    fn default() -> Self {
9908        Self::DEFAULT.clone()
9909    }
9910}
9911impl MessageData for COMPONENT_INFORMATION_DATA {
9912    type Message = MavMessage;
9913    const ID: u32 = 395u32;
9914    const NAME: &'static str = "COMPONENT_INFORMATION";
9915    const EXTRA_CRC: u8 = 0u8;
9916    const ENCODED_LEN: usize = 212usize;
9917    fn deser(
9918        _version: MavlinkVersion,
9919        __input: &[u8],
9920    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9921        let avail_len = __input.len();
9922        let mut payload_buf = [0; Self::ENCODED_LEN];
9923        let mut buf = if avail_len < Self::ENCODED_LEN {
9924            payload_buf[0..avail_len].copy_from_slice(__input);
9925            Bytes::new(&payload_buf)
9926        } else {
9927            Bytes::new(__input)
9928        };
9929        let mut __struct = Self::default();
9930        __struct.time_boot_ms = buf.get_u32_le();
9931        __struct.general_metadata_file_crc = buf.get_u32_le();
9932        __struct.peripherals_metadata_file_crc = buf.get_u32_le();
9933        for v in &mut __struct.general_metadata_uri {
9934            let val = buf.get_u8();
9935            *v = val;
9936        }
9937        for v in &mut __struct.peripherals_metadata_uri {
9938            let val = buf.get_u8();
9939            *v = val;
9940        }
9941        Ok(__struct)
9942    }
9943    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9944        let mut __tmp = BytesMut::new(bytes);
9945        #[allow(clippy::absurd_extreme_comparisons)]
9946        #[allow(unused_comparisons)]
9947        if __tmp.remaining() < Self::ENCODED_LEN {
9948            panic!(
9949                "buffer is too small (need {} bytes, but got {})",
9950                Self::ENCODED_LEN,
9951                __tmp.remaining(),
9952            )
9953        }
9954        __tmp.put_u32_le(self.time_boot_ms);
9955        __tmp.put_u32_le(self.general_metadata_file_crc);
9956        __tmp.put_u32_le(self.peripherals_metadata_file_crc);
9957        for val in &self.general_metadata_uri {
9958            __tmp.put_u8(*val);
9959        }
9960        for val in &self.peripherals_metadata_uri {
9961            __tmp.put_u8(*val);
9962        }
9963        if matches!(version, MavlinkVersion::V2) {
9964            let len = __tmp.len();
9965            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9966        } else {
9967            __tmp.len()
9968        }
9969    }
9970}
9971#[doc = "Basic component information data. Should be requested using MAV_CMD_REQUEST_MESSAGE on startup, or when required."]
9972#[doc = ""]
9973#[doc = "ID: 396"]
9974#[derive(Debug, Clone, PartialEq)]
9975#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9976#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9977pub struct COMPONENT_INFORMATION_BASIC_DATA {
9978    #[doc = "Component capability flags"]
9979    pub capabilities: MavProtocolCapability,
9980    #[doc = "Timestamp (time since system boot)."]
9981    pub time_boot_ms: u32,
9982    #[doc = "Date of manufacture as a UNIX Epoch time (since 1.1.1970) in seconds."]
9983    pub time_manufacture_s: u32,
9984    #[doc = "Name of the component vendor. Needs to be zero terminated. The field is optional and can be empty/all zeros."]
9985    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9986    pub vendor_name: [u8; 32],
9987    #[doc = "Name of the component model. Needs to be zero terminated. The field is optional and can be empty/all zeros."]
9988    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9989    pub model_name: [u8; 32],
9990    #[doc = "Software version. The recommended format is SEMVER: 'major.minor.patch'  (any format may be used). The field must be zero terminated if it has a value. The field is optional and can be empty/all zeros."]
9991    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9992    pub software_version: [u8; 24],
9993    #[doc = "Hardware version. The recommended format is SEMVER: 'major.minor.patch'  (any format may be used). The field must be zero terminated if it has a value. The field is optional and can be empty/all zeros."]
9994    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9995    pub hardware_version: [u8; 24],
9996    #[doc = "Hardware serial number. The field must be zero terminated if it has a value. The field is optional and can be empty/all zeros."]
9997    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9998    pub serial_number: [u8; 32],
9999}
10000impl COMPONENT_INFORMATION_BASIC_DATA {
10001    pub const ENCODED_LEN: usize = 160usize;
10002    pub const DEFAULT: Self = Self {
10003        capabilities: MavProtocolCapability::DEFAULT,
10004        time_boot_ms: 0_u32,
10005        time_manufacture_s: 0_u32,
10006        vendor_name: [0_u8; 32usize],
10007        model_name: [0_u8; 32usize],
10008        software_version: [0_u8; 24usize],
10009        hardware_version: [0_u8; 24usize],
10010        serial_number: [0_u8; 32usize],
10011    };
10012    #[cfg(feature = "arbitrary")]
10013    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10014        use arbitrary::{Arbitrary, Unstructured};
10015        let mut buf = [0u8; 1024];
10016        rng.fill_bytes(&mut buf);
10017        let mut unstructured = Unstructured::new(&buf);
10018        Self::arbitrary(&mut unstructured).unwrap_or_default()
10019    }
10020}
10021impl Default for COMPONENT_INFORMATION_BASIC_DATA {
10022    fn default() -> Self {
10023        Self::DEFAULT.clone()
10024    }
10025}
10026impl MessageData for COMPONENT_INFORMATION_BASIC_DATA {
10027    type Message = MavMessage;
10028    const ID: u32 = 396u32;
10029    const NAME: &'static str = "COMPONENT_INFORMATION_BASIC";
10030    const EXTRA_CRC: u8 = 50u8;
10031    const ENCODED_LEN: usize = 160usize;
10032    fn deser(
10033        _version: MavlinkVersion,
10034        __input: &[u8],
10035    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10036        let avail_len = __input.len();
10037        let mut payload_buf = [0; Self::ENCODED_LEN];
10038        let mut buf = if avail_len < Self::ENCODED_LEN {
10039            payload_buf[0..avail_len].copy_from_slice(__input);
10040            Bytes::new(&payload_buf)
10041        } else {
10042            Bytes::new(__input)
10043        };
10044        let mut __struct = Self::default();
10045        let tmp = buf.get_u64_le();
10046        __struct.capabilities = MavProtocolCapability::from_bits(
10047            tmp & MavProtocolCapability::all().bits(),
10048        )
10049        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
10050            flag_type: "MavProtocolCapability",
10051            value: tmp as u32,
10052        })?;
10053        __struct.time_boot_ms = buf.get_u32_le();
10054        __struct.time_manufacture_s = buf.get_u32_le();
10055        for v in &mut __struct.vendor_name {
10056            let val = buf.get_u8();
10057            *v = val;
10058        }
10059        for v in &mut __struct.model_name {
10060            let val = buf.get_u8();
10061            *v = val;
10062        }
10063        for v in &mut __struct.software_version {
10064            let val = buf.get_u8();
10065            *v = val;
10066        }
10067        for v in &mut __struct.hardware_version {
10068            let val = buf.get_u8();
10069            *v = val;
10070        }
10071        for v in &mut __struct.serial_number {
10072            let val = buf.get_u8();
10073            *v = val;
10074        }
10075        Ok(__struct)
10076    }
10077    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10078        let mut __tmp = BytesMut::new(bytes);
10079        #[allow(clippy::absurd_extreme_comparisons)]
10080        #[allow(unused_comparisons)]
10081        if __tmp.remaining() < Self::ENCODED_LEN {
10082            panic!(
10083                "buffer is too small (need {} bytes, but got {})",
10084                Self::ENCODED_LEN,
10085                __tmp.remaining(),
10086            )
10087        }
10088        __tmp.put_u64_le(self.capabilities.bits());
10089        __tmp.put_u32_le(self.time_boot_ms);
10090        __tmp.put_u32_le(self.time_manufacture_s);
10091        for val in &self.vendor_name {
10092            __tmp.put_u8(*val);
10093        }
10094        for val in &self.model_name {
10095            __tmp.put_u8(*val);
10096        }
10097        for val in &self.software_version {
10098            __tmp.put_u8(*val);
10099        }
10100        for val in &self.hardware_version {
10101            __tmp.put_u8(*val);
10102        }
10103        for val in &self.serial_number {
10104            __tmp.put_u8(*val);
10105        }
10106        if matches!(version, MavlinkVersion::V2) {
10107            let len = __tmp.len();
10108            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10109        } else {
10110            __tmp.len()
10111        }
10112    }
10113}
10114#[doc = "Component metadata message, which may be requested using MAV_CMD_REQUEST_MESSAGE.          This contains the MAVLink FTP URI and CRC for the component's general metadata file.         The file must be hosted on the component, and may be xz compressed.         The file CRC can be used for file caching.          The general metadata file can be read to get the locations of other metadata files (COMP_METADATA_TYPE) and translations, which may be hosted either on the vehicle or the internet.         For more information see: <https://mavlink.io/en/services/component_information.html>.          Note: Camera components should use CAMERA_INFORMATION instead, and autopilots may use both this message and AUTOPILOT_VERSION."]
10115#[doc = ""]
10116#[doc = "ID: 397"]
10117#[derive(Debug, Clone, PartialEq)]
10118#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10119#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10120pub struct COMPONENT_METADATA_DATA {
10121    #[doc = "Timestamp (time since system boot)."]
10122    pub time_boot_ms: u32,
10123    #[doc = "CRC32 of the general metadata file."]
10124    pub file_crc: u32,
10125    #[doc = "MAVLink FTP URI for the general metadata file (COMP_METADATA_TYPE_GENERAL), which may be compressed with xz. The file contains general component metadata, and may contain URI links for additional metadata (see COMP_METADATA_TYPE). The information is static from boot, and may be generated at compile time. The string needs to be zero terminated."]
10126    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10127    pub uri: [u8; 100],
10128}
10129impl COMPONENT_METADATA_DATA {
10130    pub const ENCODED_LEN: usize = 108usize;
10131    pub const DEFAULT: Self = Self {
10132        time_boot_ms: 0_u32,
10133        file_crc: 0_u32,
10134        uri: [0_u8; 100usize],
10135    };
10136    #[cfg(feature = "arbitrary")]
10137    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10138        use arbitrary::{Arbitrary, Unstructured};
10139        let mut buf = [0u8; 1024];
10140        rng.fill_bytes(&mut buf);
10141        let mut unstructured = Unstructured::new(&buf);
10142        Self::arbitrary(&mut unstructured).unwrap_or_default()
10143    }
10144}
10145impl Default for COMPONENT_METADATA_DATA {
10146    fn default() -> Self {
10147        Self::DEFAULT.clone()
10148    }
10149}
10150impl MessageData for COMPONENT_METADATA_DATA {
10151    type Message = MavMessage;
10152    const ID: u32 = 397u32;
10153    const NAME: &'static str = "COMPONENT_METADATA";
10154    const EXTRA_CRC: u8 = 182u8;
10155    const ENCODED_LEN: usize = 108usize;
10156    fn deser(
10157        _version: MavlinkVersion,
10158        __input: &[u8],
10159    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10160        let avail_len = __input.len();
10161        let mut payload_buf = [0; Self::ENCODED_LEN];
10162        let mut buf = if avail_len < Self::ENCODED_LEN {
10163            payload_buf[0..avail_len].copy_from_slice(__input);
10164            Bytes::new(&payload_buf)
10165        } else {
10166            Bytes::new(__input)
10167        };
10168        let mut __struct = Self::default();
10169        __struct.time_boot_ms = buf.get_u32_le();
10170        __struct.file_crc = buf.get_u32_le();
10171        for v in &mut __struct.uri {
10172            let val = buf.get_u8();
10173            *v = val;
10174        }
10175        Ok(__struct)
10176    }
10177    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10178        let mut __tmp = BytesMut::new(bytes);
10179        #[allow(clippy::absurd_extreme_comparisons)]
10180        #[allow(unused_comparisons)]
10181        if __tmp.remaining() < Self::ENCODED_LEN {
10182            panic!(
10183                "buffer is too small (need {} bytes, but got {})",
10184                Self::ENCODED_LEN,
10185                __tmp.remaining(),
10186            )
10187        }
10188        __tmp.put_u32_le(self.time_boot_ms);
10189        __tmp.put_u32_le(self.file_crc);
10190        for val in &self.uri {
10191            __tmp.put_u8(*val);
10192        }
10193        if matches!(version, MavlinkVersion::V2) {
10194            let len = __tmp.len();
10195            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10196        } else {
10197            __tmp.len()
10198        }
10199    }
10200}
10201#[doc = "The smoothed, monotonic system state used to feed the control loops of the system."]
10202#[doc = ""]
10203#[doc = "ID: 146"]
10204#[derive(Debug, Clone, PartialEq)]
10205#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10206#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10207pub struct CONTROL_SYSTEM_STATE_DATA {
10208    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
10209    pub time_usec: u64,
10210    #[doc = "X acceleration in body frame"]
10211    pub x_acc: f32,
10212    #[doc = "Y acceleration in body frame"]
10213    pub y_acc: f32,
10214    #[doc = "Z acceleration in body frame"]
10215    pub z_acc: f32,
10216    #[doc = "X velocity in body frame"]
10217    pub x_vel: f32,
10218    #[doc = "Y velocity in body frame"]
10219    pub y_vel: f32,
10220    #[doc = "Z velocity in body frame"]
10221    pub z_vel: f32,
10222    #[doc = "X position in local frame"]
10223    pub x_pos: f32,
10224    #[doc = "Y position in local frame"]
10225    pub y_pos: f32,
10226    #[doc = "Z position in local frame"]
10227    pub z_pos: f32,
10228    #[doc = "Airspeed, set to -1 if unknown"]
10229    pub airspeed: f32,
10230    #[doc = "Variance of body velocity estimate"]
10231    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10232    pub vel_variance: [f32; 3],
10233    #[doc = "Variance in local position"]
10234    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10235    pub pos_variance: [f32; 3],
10236    #[doc = "The attitude, represented as Quaternion"]
10237    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10238    pub q: [f32; 4],
10239    #[doc = "Angular rate in roll axis"]
10240    pub roll_rate: f32,
10241    #[doc = "Angular rate in pitch axis"]
10242    pub pitch_rate: f32,
10243    #[doc = "Angular rate in yaw axis"]
10244    pub yaw_rate: f32,
10245}
10246impl CONTROL_SYSTEM_STATE_DATA {
10247    pub const ENCODED_LEN: usize = 100usize;
10248    pub const DEFAULT: Self = Self {
10249        time_usec: 0_u64,
10250        x_acc: 0.0_f32,
10251        y_acc: 0.0_f32,
10252        z_acc: 0.0_f32,
10253        x_vel: 0.0_f32,
10254        y_vel: 0.0_f32,
10255        z_vel: 0.0_f32,
10256        x_pos: 0.0_f32,
10257        y_pos: 0.0_f32,
10258        z_pos: 0.0_f32,
10259        airspeed: 0.0_f32,
10260        vel_variance: [0.0_f32; 3usize],
10261        pos_variance: [0.0_f32; 3usize],
10262        q: [0.0_f32; 4usize],
10263        roll_rate: 0.0_f32,
10264        pitch_rate: 0.0_f32,
10265        yaw_rate: 0.0_f32,
10266    };
10267    #[cfg(feature = "arbitrary")]
10268    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10269        use arbitrary::{Arbitrary, Unstructured};
10270        let mut buf = [0u8; 1024];
10271        rng.fill_bytes(&mut buf);
10272        let mut unstructured = Unstructured::new(&buf);
10273        Self::arbitrary(&mut unstructured).unwrap_or_default()
10274    }
10275}
10276impl Default for CONTROL_SYSTEM_STATE_DATA {
10277    fn default() -> Self {
10278        Self::DEFAULT.clone()
10279    }
10280}
10281impl MessageData for CONTROL_SYSTEM_STATE_DATA {
10282    type Message = MavMessage;
10283    const ID: u32 = 146u32;
10284    const NAME: &'static str = "CONTROL_SYSTEM_STATE";
10285    const EXTRA_CRC: u8 = 103u8;
10286    const ENCODED_LEN: usize = 100usize;
10287    fn deser(
10288        _version: MavlinkVersion,
10289        __input: &[u8],
10290    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10291        let avail_len = __input.len();
10292        let mut payload_buf = [0; Self::ENCODED_LEN];
10293        let mut buf = if avail_len < Self::ENCODED_LEN {
10294            payload_buf[0..avail_len].copy_from_slice(__input);
10295            Bytes::new(&payload_buf)
10296        } else {
10297            Bytes::new(__input)
10298        };
10299        let mut __struct = Self::default();
10300        __struct.time_usec = buf.get_u64_le();
10301        __struct.x_acc = buf.get_f32_le();
10302        __struct.y_acc = buf.get_f32_le();
10303        __struct.z_acc = buf.get_f32_le();
10304        __struct.x_vel = buf.get_f32_le();
10305        __struct.y_vel = buf.get_f32_le();
10306        __struct.z_vel = buf.get_f32_le();
10307        __struct.x_pos = buf.get_f32_le();
10308        __struct.y_pos = buf.get_f32_le();
10309        __struct.z_pos = buf.get_f32_le();
10310        __struct.airspeed = buf.get_f32_le();
10311        for v in &mut __struct.vel_variance {
10312            let val = buf.get_f32_le();
10313            *v = val;
10314        }
10315        for v in &mut __struct.pos_variance {
10316            let val = buf.get_f32_le();
10317            *v = val;
10318        }
10319        for v in &mut __struct.q {
10320            let val = buf.get_f32_le();
10321            *v = val;
10322        }
10323        __struct.roll_rate = buf.get_f32_le();
10324        __struct.pitch_rate = buf.get_f32_le();
10325        __struct.yaw_rate = buf.get_f32_le();
10326        Ok(__struct)
10327    }
10328    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10329        let mut __tmp = BytesMut::new(bytes);
10330        #[allow(clippy::absurd_extreme_comparisons)]
10331        #[allow(unused_comparisons)]
10332        if __tmp.remaining() < Self::ENCODED_LEN {
10333            panic!(
10334                "buffer is too small (need {} bytes, but got {})",
10335                Self::ENCODED_LEN,
10336                __tmp.remaining(),
10337            )
10338        }
10339        __tmp.put_u64_le(self.time_usec);
10340        __tmp.put_f32_le(self.x_acc);
10341        __tmp.put_f32_le(self.y_acc);
10342        __tmp.put_f32_le(self.z_acc);
10343        __tmp.put_f32_le(self.x_vel);
10344        __tmp.put_f32_le(self.y_vel);
10345        __tmp.put_f32_le(self.z_vel);
10346        __tmp.put_f32_le(self.x_pos);
10347        __tmp.put_f32_le(self.y_pos);
10348        __tmp.put_f32_le(self.z_pos);
10349        __tmp.put_f32_le(self.airspeed);
10350        for val in &self.vel_variance {
10351            __tmp.put_f32_le(*val);
10352        }
10353        for val in &self.pos_variance {
10354            __tmp.put_f32_le(*val);
10355        }
10356        for val in &self.q {
10357            __tmp.put_f32_le(*val);
10358        }
10359        __tmp.put_f32_le(self.roll_rate);
10360        __tmp.put_f32_le(self.pitch_rate);
10361        __tmp.put_f32_le(self.yaw_rate);
10362        if matches!(version, MavlinkVersion::V2) {
10363            let len = __tmp.len();
10364            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10365        } else {
10366            __tmp.len()
10367        }
10368    }
10369}
10370#[doc = "Regular broadcast for the current latest event sequence number for a component. This is used to check for dropped events."]
10371#[doc = ""]
10372#[doc = "ID: 411"]
10373#[derive(Debug, Clone, PartialEq)]
10374#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10375#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10376pub struct CURRENT_EVENT_SEQUENCE_DATA {
10377    #[doc = "Sequence number."]
10378    pub sequence: u16,
10379    #[doc = "Flag bitset."]
10380    pub flags: MavEventCurrentSequenceFlags,
10381}
10382impl CURRENT_EVENT_SEQUENCE_DATA {
10383    pub const ENCODED_LEN: usize = 3usize;
10384    pub const DEFAULT: Self = Self {
10385        sequence: 0_u16,
10386        flags: MavEventCurrentSequenceFlags::DEFAULT,
10387    };
10388    #[cfg(feature = "arbitrary")]
10389    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10390        use arbitrary::{Arbitrary, Unstructured};
10391        let mut buf = [0u8; 1024];
10392        rng.fill_bytes(&mut buf);
10393        let mut unstructured = Unstructured::new(&buf);
10394        Self::arbitrary(&mut unstructured).unwrap_or_default()
10395    }
10396}
10397impl Default for CURRENT_EVENT_SEQUENCE_DATA {
10398    fn default() -> Self {
10399        Self::DEFAULT.clone()
10400    }
10401}
10402impl MessageData for CURRENT_EVENT_SEQUENCE_DATA {
10403    type Message = MavMessage;
10404    const ID: u32 = 411u32;
10405    const NAME: &'static str = "CURRENT_EVENT_SEQUENCE";
10406    const EXTRA_CRC: u8 = 106u8;
10407    const ENCODED_LEN: usize = 3usize;
10408    fn deser(
10409        _version: MavlinkVersion,
10410        __input: &[u8],
10411    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10412        let avail_len = __input.len();
10413        let mut payload_buf = [0; Self::ENCODED_LEN];
10414        let mut buf = if avail_len < Self::ENCODED_LEN {
10415            payload_buf[0..avail_len].copy_from_slice(__input);
10416            Bytes::new(&payload_buf)
10417        } else {
10418            Bytes::new(__input)
10419        };
10420        let mut __struct = Self::default();
10421        __struct.sequence = buf.get_u16_le();
10422        let tmp = buf.get_u8();
10423        __struct.flags =
10424            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
10425                enum_type: "MavEventCurrentSequenceFlags",
10426                value: tmp as u32,
10427            })?;
10428        Ok(__struct)
10429    }
10430    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10431        let mut __tmp = BytesMut::new(bytes);
10432        #[allow(clippy::absurd_extreme_comparisons)]
10433        #[allow(unused_comparisons)]
10434        if __tmp.remaining() < Self::ENCODED_LEN {
10435            panic!(
10436                "buffer is too small (need {} bytes, but got {})",
10437                Self::ENCODED_LEN,
10438                __tmp.remaining(),
10439            )
10440        }
10441        __tmp.put_u16_le(self.sequence);
10442        __tmp.put_u8(self.flags as u8);
10443        if matches!(version, MavlinkVersion::V2) {
10444            let len = __tmp.len();
10445            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10446        } else {
10447            __tmp.len()
10448        }
10449    }
10450}
10451#[doc = "Get the current mode.         This should be emitted on any mode change, and broadcast at low rate (nominally 0.5 Hz).         It may be requested using MAV_CMD_REQUEST_MESSAGE.         See <https://mavlink.io/en/services/standard_modes.html>."]
10452#[doc = ""]
10453#[doc = "ID: 436"]
10454#[derive(Debug, Clone, PartialEq)]
10455#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10456#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10457pub struct CURRENT_MODE_DATA {
10458    #[doc = "A bitfield for use for autopilot-specific flags"]
10459    pub custom_mode: u32,
10460    #[doc = "The custom_mode of the mode that was last commanded by the user (for example, with MAV_CMD_DO_SET_STANDARD_MODE, MAV_CMD_DO_SET_MODE or via RC). This should usually be the same as custom_mode. It will be different if the vehicle is unable to enter the intended mode, or has left that mode due to a failsafe condition. 0 indicates the intended custom mode is unknown/not supplied"]
10461    pub intended_custom_mode: u32,
10462    #[doc = "Standard mode."]
10463    pub standard_mode: MavStandardMode,
10464}
10465impl CURRENT_MODE_DATA {
10466    pub const ENCODED_LEN: usize = 9usize;
10467    pub const DEFAULT: Self = Self {
10468        custom_mode: 0_u32,
10469        intended_custom_mode: 0_u32,
10470        standard_mode: MavStandardMode::DEFAULT,
10471    };
10472    #[cfg(feature = "arbitrary")]
10473    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10474        use arbitrary::{Arbitrary, Unstructured};
10475        let mut buf = [0u8; 1024];
10476        rng.fill_bytes(&mut buf);
10477        let mut unstructured = Unstructured::new(&buf);
10478        Self::arbitrary(&mut unstructured).unwrap_or_default()
10479    }
10480}
10481impl Default for CURRENT_MODE_DATA {
10482    fn default() -> Self {
10483        Self::DEFAULT.clone()
10484    }
10485}
10486impl MessageData for CURRENT_MODE_DATA {
10487    type Message = MavMessage;
10488    const ID: u32 = 436u32;
10489    const NAME: &'static str = "CURRENT_MODE";
10490    const EXTRA_CRC: u8 = 193u8;
10491    const ENCODED_LEN: usize = 9usize;
10492    fn deser(
10493        _version: MavlinkVersion,
10494        __input: &[u8],
10495    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10496        let avail_len = __input.len();
10497        let mut payload_buf = [0; Self::ENCODED_LEN];
10498        let mut buf = if avail_len < Self::ENCODED_LEN {
10499            payload_buf[0..avail_len].copy_from_slice(__input);
10500            Bytes::new(&payload_buf)
10501        } else {
10502            Bytes::new(__input)
10503        };
10504        let mut __struct = Self::default();
10505        __struct.custom_mode = buf.get_u32_le();
10506        __struct.intended_custom_mode = buf.get_u32_le();
10507        let tmp = buf.get_u8();
10508        __struct.standard_mode =
10509            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
10510                enum_type: "MavStandardMode",
10511                value: tmp as u32,
10512            })?;
10513        Ok(__struct)
10514    }
10515    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10516        let mut __tmp = BytesMut::new(bytes);
10517        #[allow(clippy::absurd_extreme_comparisons)]
10518        #[allow(unused_comparisons)]
10519        if __tmp.remaining() < Self::ENCODED_LEN {
10520            panic!(
10521                "buffer is too small (need {} bytes, but got {})",
10522                Self::ENCODED_LEN,
10523                __tmp.remaining(),
10524            )
10525        }
10526        __tmp.put_u32_le(self.custom_mode);
10527        __tmp.put_u32_le(self.intended_custom_mode);
10528        __tmp.put_u8(self.standard_mode as u8);
10529        if matches!(version, MavlinkVersion::V2) {
10530            let len = __tmp.len();
10531            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10532        } else {
10533            __tmp.len()
10534        }
10535    }
10536}
10537#[deprecated = " See `MESSAGE_INTERVAL` (Deprecated since 2015-08)"]
10538#[doc = "Data stream status information."]
10539#[doc = ""]
10540#[doc = "ID: 67"]
10541#[derive(Debug, Clone, PartialEq)]
10542#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10543#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10544pub struct DATA_STREAM_DATA {
10545    #[doc = "The message rate"]
10546    pub message_rate: u16,
10547    #[doc = "The ID of the requested data stream"]
10548    pub stream_id: u8,
10549    #[doc = "1 stream is enabled, 0 stream is stopped."]
10550    pub on_off: u8,
10551}
10552impl DATA_STREAM_DATA {
10553    pub const ENCODED_LEN: usize = 4usize;
10554    pub const DEFAULT: Self = Self {
10555        message_rate: 0_u16,
10556        stream_id: 0_u8,
10557        on_off: 0_u8,
10558    };
10559    #[cfg(feature = "arbitrary")]
10560    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10561        use arbitrary::{Arbitrary, Unstructured};
10562        let mut buf = [0u8; 1024];
10563        rng.fill_bytes(&mut buf);
10564        let mut unstructured = Unstructured::new(&buf);
10565        Self::arbitrary(&mut unstructured).unwrap_or_default()
10566    }
10567}
10568impl Default for DATA_STREAM_DATA {
10569    fn default() -> Self {
10570        Self::DEFAULT.clone()
10571    }
10572}
10573impl MessageData for DATA_STREAM_DATA {
10574    type Message = MavMessage;
10575    const ID: u32 = 67u32;
10576    const NAME: &'static str = "DATA_STREAM";
10577    const EXTRA_CRC: u8 = 21u8;
10578    const ENCODED_LEN: usize = 4usize;
10579    fn deser(
10580        _version: MavlinkVersion,
10581        __input: &[u8],
10582    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10583        let avail_len = __input.len();
10584        let mut payload_buf = [0; Self::ENCODED_LEN];
10585        let mut buf = if avail_len < Self::ENCODED_LEN {
10586            payload_buf[0..avail_len].copy_from_slice(__input);
10587            Bytes::new(&payload_buf)
10588        } else {
10589            Bytes::new(__input)
10590        };
10591        let mut __struct = Self::default();
10592        __struct.message_rate = buf.get_u16_le();
10593        __struct.stream_id = buf.get_u8();
10594        __struct.on_off = buf.get_u8();
10595        Ok(__struct)
10596    }
10597    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10598        let mut __tmp = BytesMut::new(bytes);
10599        #[allow(clippy::absurd_extreme_comparisons)]
10600        #[allow(unused_comparisons)]
10601        if __tmp.remaining() < Self::ENCODED_LEN {
10602            panic!(
10603                "buffer is too small (need {} bytes, but got {})",
10604                Self::ENCODED_LEN,
10605                __tmp.remaining(),
10606            )
10607        }
10608        __tmp.put_u16_le(self.message_rate);
10609        __tmp.put_u8(self.stream_id);
10610        __tmp.put_u8(self.on_off);
10611        if matches!(version, MavlinkVersion::V2) {
10612            let len = __tmp.len();
10613            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10614        } else {
10615            __tmp.len()
10616        }
10617    }
10618}
10619#[doc = "Handshake message to initiate, control and stop image streaming when using the Image Transmission Protocol: <https://mavlink.io/en/services/image_transmission.html>."]
10620#[doc = ""]
10621#[doc = "ID: 130"]
10622#[derive(Debug, Clone, PartialEq)]
10623#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10624#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10625pub struct DATA_TRANSMISSION_HANDSHAKE_DATA {
10626    #[doc = "total data size (set on ACK only)."]
10627    pub size: u32,
10628    #[doc = "Width of a matrix or image."]
10629    pub width: u16,
10630    #[doc = "Height of a matrix or image."]
10631    pub height: u16,
10632    #[doc = "Number of packets being sent (set on ACK only)."]
10633    pub packets: u16,
10634    #[doc = "Type of requested/acknowledged data."]
10635    pub mavtype: MavlinkDataStreamType,
10636    #[doc = "Payload size per packet (normally 253 byte, see DATA field size in message ENCAPSULATED_DATA) (set on ACK only)."]
10637    pub payload: u8,
10638    #[doc = "JPEG quality. Values: [1-100]."]
10639    pub jpg_quality: u8,
10640}
10641impl DATA_TRANSMISSION_HANDSHAKE_DATA {
10642    pub const ENCODED_LEN: usize = 13usize;
10643    pub const DEFAULT: Self = Self {
10644        size: 0_u32,
10645        width: 0_u16,
10646        height: 0_u16,
10647        packets: 0_u16,
10648        mavtype: MavlinkDataStreamType::DEFAULT,
10649        payload: 0_u8,
10650        jpg_quality: 0_u8,
10651    };
10652    #[cfg(feature = "arbitrary")]
10653    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10654        use arbitrary::{Arbitrary, Unstructured};
10655        let mut buf = [0u8; 1024];
10656        rng.fill_bytes(&mut buf);
10657        let mut unstructured = Unstructured::new(&buf);
10658        Self::arbitrary(&mut unstructured).unwrap_or_default()
10659    }
10660}
10661impl Default for DATA_TRANSMISSION_HANDSHAKE_DATA {
10662    fn default() -> Self {
10663        Self::DEFAULT.clone()
10664    }
10665}
10666impl MessageData for DATA_TRANSMISSION_HANDSHAKE_DATA {
10667    type Message = MavMessage;
10668    const ID: u32 = 130u32;
10669    const NAME: &'static str = "DATA_TRANSMISSION_HANDSHAKE";
10670    const EXTRA_CRC: u8 = 29u8;
10671    const ENCODED_LEN: usize = 13usize;
10672    fn deser(
10673        _version: MavlinkVersion,
10674        __input: &[u8],
10675    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10676        let avail_len = __input.len();
10677        let mut payload_buf = [0; Self::ENCODED_LEN];
10678        let mut buf = if avail_len < Self::ENCODED_LEN {
10679            payload_buf[0..avail_len].copy_from_slice(__input);
10680            Bytes::new(&payload_buf)
10681        } else {
10682            Bytes::new(__input)
10683        };
10684        let mut __struct = Self::default();
10685        __struct.size = buf.get_u32_le();
10686        __struct.width = buf.get_u16_le();
10687        __struct.height = buf.get_u16_le();
10688        __struct.packets = buf.get_u16_le();
10689        let tmp = buf.get_u8();
10690        __struct.mavtype =
10691            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
10692                enum_type: "MavlinkDataStreamType",
10693                value: tmp as u32,
10694            })?;
10695        __struct.payload = buf.get_u8();
10696        __struct.jpg_quality = buf.get_u8();
10697        Ok(__struct)
10698    }
10699    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10700        let mut __tmp = BytesMut::new(bytes);
10701        #[allow(clippy::absurd_extreme_comparisons)]
10702        #[allow(unused_comparisons)]
10703        if __tmp.remaining() < Self::ENCODED_LEN {
10704            panic!(
10705                "buffer is too small (need {} bytes, but got {})",
10706                Self::ENCODED_LEN,
10707                __tmp.remaining(),
10708            )
10709        }
10710        __tmp.put_u32_le(self.size);
10711        __tmp.put_u16_le(self.width);
10712        __tmp.put_u16_le(self.height);
10713        __tmp.put_u16_le(self.packets);
10714        __tmp.put_u8(self.mavtype as u8);
10715        __tmp.put_u8(self.payload);
10716        __tmp.put_u8(self.jpg_quality);
10717        if matches!(version, MavlinkVersion::V2) {
10718            let len = __tmp.len();
10719            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10720        } else {
10721            __tmp.len()
10722        }
10723    }
10724}
10725#[doc = "Send a debug value. The index is used to discriminate between values. These values show up in the plot of QGroundControl as DEBUG N."]
10726#[doc = ""]
10727#[doc = "ID: 254"]
10728#[derive(Debug, Clone, PartialEq)]
10729#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10730#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10731pub struct DEBUG_DATA {
10732    #[doc = "Timestamp (time since system boot)."]
10733    pub time_boot_ms: u32,
10734    #[doc = "DEBUG value"]
10735    pub value: f32,
10736    #[doc = "index of debug variable"]
10737    pub ind: u8,
10738}
10739impl DEBUG_DATA {
10740    pub const ENCODED_LEN: usize = 9usize;
10741    pub const DEFAULT: Self = Self {
10742        time_boot_ms: 0_u32,
10743        value: 0.0_f32,
10744        ind: 0_u8,
10745    };
10746    #[cfg(feature = "arbitrary")]
10747    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10748        use arbitrary::{Arbitrary, Unstructured};
10749        let mut buf = [0u8; 1024];
10750        rng.fill_bytes(&mut buf);
10751        let mut unstructured = Unstructured::new(&buf);
10752        Self::arbitrary(&mut unstructured).unwrap_or_default()
10753    }
10754}
10755impl Default for DEBUG_DATA {
10756    fn default() -> Self {
10757        Self::DEFAULT.clone()
10758    }
10759}
10760impl MessageData for DEBUG_DATA {
10761    type Message = MavMessage;
10762    const ID: u32 = 254u32;
10763    const NAME: &'static str = "DEBUG";
10764    const EXTRA_CRC: u8 = 46u8;
10765    const ENCODED_LEN: usize = 9usize;
10766    fn deser(
10767        _version: MavlinkVersion,
10768        __input: &[u8],
10769    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10770        let avail_len = __input.len();
10771        let mut payload_buf = [0; Self::ENCODED_LEN];
10772        let mut buf = if avail_len < Self::ENCODED_LEN {
10773            payload_buf[0..avail_len].copy_from_slice(__input);
10774            Bytes::new(&payload_buf)
10775        } else {
10776            Bytes::new(__input)
10777        };
10778        let mut __struct = Self::default();
10779        __struct.time_boot_ms = buf.get_u32_le();
10780        __struct.value = buf.get_f32_le();
10781        __struct.ind = buf.get_u8();
10782        Ok(__struct)
10783    }
10784    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10785        let mut __tmp = BytesMut::new(bytes);
10786        #[allow(clippy::absurd_extreme_comparisons)]
10787        #[allow(unused_comparisons)]
10788        if __tmp.remaining() < Self::ENCODED_LEN {
10789            panic!(
10790                "buffer is too small (need {} bytes, but got {})",
10791                Self::ENCODED_LEN,
10792                __tmp.remaining(),
10793            )
10794        }
10795        __tmp.put_u32_le(self.time_boot_ms);
10796        __tmp.put_f32_le(self.value);
10797        __tmp.put_u8(self.ind);
10798        if matches!(version, MavlinkVersion::V2) {
10799            let len = __tmp.len();
10800            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10801        } else {
10802            __tmp.len()
10803        }
10804    }
10805}
10806#[doc = "Large debug/prototyping array. The message uses the maximum available payload for data. The array_id and name fields are used to discriminate between messages in code and in user interfaces (respectively). Do not use in production code."]
10807#[doc = ""]
10808#[doc = "ID: 350"]
10809#[derive(Debug, Clone, PartialEq)]
10810#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10811#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10812pub struct DEBUG_FLOAT_ARRAY_DATA {
10813    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
10814    pub time_usec: u64,
10815    #[doc = "Unique ID used to discriminate between arrays"]
10816    pub array_id: u16,
10817    #[doc = "Name, for human-friendly display in a Ground Control Station"]
10818    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10819    pub name: [u8; 10],
10820    #[doc = "data"]
10821    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10822    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10823    pub data: [f32; 58],
10824}
10825impl DEBUG_FLOAT_ARRAY_DATA {
10826    pub const ENCODED_LEN: usize = 252usize;
10827    pub const DEFAULT: Self = Self {
10828        time_usec: 0_u64,
10829        array_id: 0_u16,
10830        name: [0_u8; 10usize],
10831        data: [0.0_f32; 58usize],
10832    };
10833    #[cfg(feature = "arbitrary")]
10834    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10835        use arbitrary::{Arbitrary, Unstructured};
10836        let mut buf = [0u8; 1024];
10837        rng.fill_bytes(&mut buf);
10838        let mut unstructured = Unstructured::new(&buf);
10839        Self::arbitrary(&mut unstructured).unwrap_or_default()
10840    }
10841}
10842impl Default for DEBUG_FLOAT_ARRAY_DATA {
10843    fn default() -> Self {
10844        Self::DEFAULT.clone()
10845    }
10846}
10847impl MessageData for DEBUG_FLOAT_ARRAY_DATA {
10848    type Message = MavMessage;
10849    const ID: u32 = 350u32;
10850    const NAME: &'static str = "DEBUG_FLOAT_ARRAY";
10851    const EXTRA_CRC: u8 = 232u8;
10852    const ENCODED_LEN: usize = 252usize;
10853    fn deser(
10854        _version: MavlinkVersion,
10855        __input: &[u8],
10856    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10857        let avail_len = __input.len();
10858        let mut payload_buf = [0; Self::ENCODED_LEN];
10859        let mut buf = if avail_len < Self::ENCODED_LEN {
10860            payload_buf[0..avail_len].copy_from_slice(__input);
10861            Bytes::new(&payload_buf)
10862        } else {
10863            Bytes::new(__input)
10864        };
10865        let mut __struct = Self::default();
10866        __struct.time_usec = buf.get_u64_le();
10867        __struct.array_id = buf.get_u16_le();
10868        for v in &mut __struct.name {
10869            let val = buf.get_u8();
10870            *v = val;
10871        }
10872        for v in &mut __struct.data {
10873            let val = buf.get_f32_le();
10874            *v = val;
10875        }
10876        Ok(__struct)
10877    }
10878    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10879        let mut __tmp = BytesMut::new(bytes);
10880        #[allow(clippy::absurd_extreme_comparisons)]
10881        #[allow(unused_comparisons)]
10882        if __tmp.remaining() < Self::ENCODED_LEN {
10883            panic!(
10884                "buffer is too small (need {} bytes, but got {})",
10885                Self::ENCODED_LEN,
10886                __tmp.remaining(),
10887            )
10888        }
10889        __tmp.put_u64_le(self.time_usec);
10890        __tmp.put_u16_le(self.array_id);
10891        for val in &self.name {
10892            __tmp.put_u8(*val);
10893        }
10894        if matches!(version, MavlinkVersion::V2) {
10895            for val in &self.data {
10896                __tmp.put_f32_le(*val);
10897            }
10898            let len = __tmp.len();
10899            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10900        } else {
10901            __tmp.len()
10902        }
10903    }
10904}
10905#[doc = "To debug something using a named 3D vector."]
10906#[doc = ""]
10907#[doc = "ID: 250"]
10908#[derive(Debug, Clone, PartialEq)]
10909#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10910#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10911pub struct DEBUG_VECT_DATA {
10912    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
10913    pub time_usec: u64,
10914    #[doc = "x"]
10915    pub x: f32,
10916    #[doc = "y"]
10917    pub y: f32,
10918    #[doc = "z"]
10919    pub z: f32,
10920    #[doc = "Name"]
10921    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10922    pub name: [u8; 10],
10923}
10924impl DEBUG_VECT_DATA {
10925    pub const ENCODED_LEN: usize = 30usize;
10926    pub const DEFAULT: Self = Self {
10927        time_usec: 0_u64,
10928        x: 0.0_f32,
10929        y: 0.0_f32,
10930        z: 0.0_f32,
10931        name: [0_u8; 10usize],
10932    };
10933    #[cfg(feature = "arbitrary")]
10934    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10935        use arbitrary::{Arbitrary, Unstructured};
10936        let mut buf = [0u8; 1024];
10937        rng.fill_bytes(&mut buf);
10938        let mut unstructured = Unstructured::new(&buf);
10939        Self::arbitrary(&mut unstructured).unwrap_or_default()
10940    }
10941}
10942impl Default for DEBUG_VECT_DATA {
10943    fn default() -> Self {
10944        Self::DEFAULT.clone()
10945    }
10946}
10947impl MessageData for DEBUG_VECT_DATA {
10948    type Message = MavMessage;
10949    const ID: u32 = 250u32;
10950    const NAME: &'static str = "DEBUG_VECT";
10951    const EXTRA_CRC: u8 = 49u8;
10952    const ENCODED_LEN: usize = 30usize;
10953    fn deser(
10954        _version: MavlinkVersion,
10955        __input: &[u8],
10956    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10957        let avail_len = __input.len();
10958        let mut payload_buf = [0; Self::ENCODED_LEN];
10959        let mut buf = if avail_len < Self::ENCODED_LEN {
10960            payload_buf[0..avail_len].copy_from_slice(__input);
10961            Bytes::new(&payload_buf)
10962        } else {
10963            Bytes::new(__input)
10964        };
10965        let mut __struct = Self::default();
10966        __struct.time_usec = buf.get_u64_le();
10967        __struct.x = buf.get_f32_le();
10968        __struct.y = buf.get_f32_le();
10969        __struct.z = buf.get_f32_le();
10970        for v in &mut __struct.name {
10971            let val = buf.get_u8();
10972            *v = val;
10973        }
10974        Ok(__struct)
10975    }
10976    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10977        let mut __tmp = BytesMut::new(bytes);
10978        #[allow(clippy::absurd_extreme_comparisons)]
10979        #[allow(unused_comparisons)]
10980        if __tmp.remaining() < Self::ENCODED_LEN {
10981            panic!(
10982                "buffer is too small (need {} bytes, but got {})",
10983                Self::ENCODED_LEN,
10984                __tmp.remaining(),
10985            )
10986        }
10987        __tmp.put_u64_le(self.time_usec);
10988        __tmp.put_f32_le(self.x);
10989        __tmp.put_f32_le(self.y);
10990        __tmp.put_f32_le(self.z);
10991        for val in &self.name {
10992            __tmp.put_u8(*val);
10993        }
10994        if matches!(version, MavlinkVersion::V2) {
10995            let len = __tmp.len();
10996            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10997        } else {
10998            __tmp.len()
10999        }
11000    }
11001}
11002#[doc = "Distance sensor information for an onboard rangefinder."]
11003#[doc = ""]
11004#[doc = "ID: 132"]
11005#[derive(Debug, Clone, PartialEq)]
11006#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11007#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11008pub struct DISTANCE_SENSOR_DATA {
11009    #[doc = "Timestamp (time since system boot)."]
11010    pub time_boot_ms: u32,
11011    #[doc = "Minimum distance the sensor can measure"]
11012    pub min_distance: u16,
11013    #[doc = "Maximum distance the sensor can measure"]
11014    pub max_distance: u16,
11015    #[doc = "Current distance reading"]
11016    pub current_distance: u16,
11017    #[doc = "Type of distance sensor."]
11018    pub mavtype: MavDistanceSensor,
11019    #[doc = "Onboard ID of the sensor"]
11020    pub id: u8,
11021    #[doc = "Direction the sensor faces. downward-facing: ROTATION_PITCH_270, upward-facing: ROTATION_PITCH_90, backward-facing: ROTATION_PITCH_180, forward-facing: ROTATION_NONE, left-facing: ROTATION_YAW_90, right-facing: ROTATION_YAW_270"]
11022    pub orientation: MavSensorOrientation,
11023    #[doc = "Measurement variance. Max standard deviation is 6cm. UINT8_MAX if unknown."]
11024    pub covariance: u8,
11025    #[doc = "Horizontal Field of View (angle) where the distance measurement is valid and the field of view is known. Otherwise this is set to 0."]
11026    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
11027    pub horizontal_fov: f32,
11028    #[doc = "Vertical Field of View (angle) where the distance measurement is valid and the field of view is known. Otherwise this is set to 0."]
11029    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
11030    pub vertical_fov: f32,
11031    #[doc = "Quaternion of the sensor orientation in vehicle body frame (w, x, y, z order, zero-rotation is 1, 0, 0, 0). Zero-rotation is along the vehicle body x-axis. This field is required if the orientation is set to MAV_SENSOR_ROTATION_CUSTOM. Set it to 0 if invalid.\""]
11032    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
11033    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11034    pub quaternion: [f32; 4],
11035    #[doc = "Signal quality of the sensor. Specific to each sensor type, representing the relation of the signal strength with the target reflectivity, distance, size or aspect, but normalised as a percentage. 0 = unknown/unset signal quality, 1 = invalid signal, 100 = perfect signal."]
11036    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
11037    pub signal_quality: u8,
11038}
11039impl DISTANCE_SENSOR_DATA {
11040    pub const ENCODED_LEN: usize = 39usize;
11041    pub const DEFAULT: Self = Self {
11042        time_boot_ms: 0_u32,
11043        min_distance: 0_u16,
11044        max_distance: 0_u16,
11045        current_distance: 0_u16,
11046        mavtype: MavDistanceSensor::DEFAULT,
11047        id: 0_u8,
11048        orientation: MavSensorOrientation::DEFAULT,
11049        covariance: 0_u8,
11050        horizontal_fov: 0.0_f32,
11051        vertical_fov: 0.0_f32,
11052        quaternion: [0.0_f32; 4usize],
11053        signal_quality: 0_u8,
11054    };
11055    #[cfg(feature = "arbitrary")]
11056    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11057        use arbitrary::{Arbitrary, Unstructured};
11058        let mut buf = [0u8; 1024];
11059        rng.fill_bytes(&mut buf);
11060        let mut unstructured = Unstructured::new(&buf);
11061        Self::arbitrary(&mut unstructured).unwrap_or_default()
11062    }
11063}
11064impl Default for DISTANCE_SENSOR_DATA {
11065    fn default() -> Self {
11066        Self::DEFAULT.clone()
11067    }
11068}
11069impl MessageData for DISTANCE_SENSOR_DATA {
11070    type Message = MavMessage;
11071    const ID: u32 = 132u32;
11072    const NAME: &'static str = "DISTANCE_SENSOR";
11073    const EXTRA_CRC: u8 = 85u8;
11074    const ENCODED_LEN: usize = 39usize;
11075    fn deser(
11076        _version: MavlinkVersion,
11077        __input: &[u8],
11078    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11079        let avail_len = __input.len();
11080        let mut payload_buf = [0; Self::ENCODED_LEN];
11081        let mut buf = if avail_len < Self::ENCODED_LEN {
11082            payload_buf[0..avail_len].copy_from_slice(__input);
11083            Bytes::new(&payload_buf)
11084        } else {
11085            Bytes::new(__input)
11086        };
11087        let mut __struct = Self::default();
11088        __struct.time_boot_ms = buf.get_u32_le();
11089        __struct.min_distance = buf.get_u16_le();
11090        __struct.max_distance = buf.get_u16_le();
11091        __struct.current_distance = buf.get_u16_le();
11092        let tmp = buf.get_u8();
11093        __struct.mavtype =
11094            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
11095                enum_type: "MavDistanceSensor",
11096                value: tmp as u32,
11097            })?;
11098        __struct.id = buf.get_u8();
11099        let tmp = buf.get_u8();
11100        __struct.orientation =
11101            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
11102                enum_type: "MavSensorOrientation",
11103                value: tmp as u32,
11104            })?;
11105        __struct.covariance = buf.get_u8();
11106        __struct.horizontal_fov = buf.get_f32_le();
11107        __struct.vertical_fov = buf.get_f32_le();
11108        for v in &mut __struct.quaternion {
11109            let val = buf.get_f32_le();
11110            *v = val;
11111        }
11112        __struct.signal_quality = buf.get_u8();
11113        Ok(__struct)
11114    }
11115    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11116        let mut __tmp = BytesMut::new(bytes);
11117        #[allow(clippy::absurd_extreme_comparisons)]
11118        #[allow(unused_comparisons)]
11119        if __tmp.remaining() < Self::ENCODED_LEN {
11120            panic!(
11121                "buffer is too small (need {} bytes, but got {})",
11122                Self::ENCODED_LEN,
11123                __tmp.remaining(),
11124            )
11125        }
11126        __tmp.put_u32_le(self.time_boot_ms);
11127        __tmp.put_u16_le(self.min_distance);
11128        __tmp.put_u16_le(self.max_distance);
11129        __tmp.put_u16_le(self.current_distance);
11130        __tmp.put_u8(self.mavtype as u8);
11131        __tmp.put_u8(self.id);
11132        __tmp.put_u8(self.orientation as u8);
11133        __tmp.put_u8(self.covariance);
11134        if matches!(version, MavlinkVersion::V2) {
11135            __tmp.put_f32_le(self.horizontal_fov);
11136            __tmp.put_f32_le(self.vertical_fov);
11137            for val in &self.quaternion {
11138                __tmp.put_f32_le(*val);
11139            }
11140            __tmp.put_u8(self.signal_quality);
11141            let len = __tmp.len();
11142            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11143        } else {
11144            __tmp.len()
11145        }
11146    }
11147}
11148#[doc = "EFI status output."]
11149#[doc = ""]
11150#[doc = "ID: 225"]
11151#[derive(Debug, Clone, PartialEq)]
11152#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11153#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11154pub struct EFI_STATUS_DATA {
11155    #[doc = "ECU index"]
11156    pub ecu_index: f32,
11157    #[doc = "RPM"]
11158    pub rpm: f32,
11159    #[doc = "Fuel consumed"]
11160    pub fuel_consumed: f32,
11161    #[doc = "Fuel flow rate"]
11162    pub fuel_flow: f32,
11163    #[doc = "Engine load"]
11164    pub engine_load: f32,
11165    #[doc = "Throttle position"]
11166    pub throttle_position: f32,
11167    #[doc = "Spark dwell time"]
11168    pub spark_dwell_time: f32,
11169    #[doc = "Barometric pressure"]
11170    pub barometric_pressure: f32,
11171    #[doc = "Intake manifold pressure("]
11172    pub intake_manifold_pressure: f32,
11173    #[doc = "Intake manifold temperature"]
11174    pub intake_manifold_temperature: f32,
11175    #[doc = "Cylinder head temperature"]
11176    pub cylinder_head_temperature: f32,
11177    #[doc = "Ignition timing (Crank angle degrees)"]
11178    pub ignition_timing: f32,
11179    #[doc = "Injection time"]
11180    pub injection_time: f32,
11181    #[doc = "Exhaust gas temperature"]
11182    pub exhaust_gas_temperature: f32,
11183    #[doc = "Output throttle"]
11184    pub throttle_out: f32,
11185    #[doc = "Pressure/temperature compensation"]
11186    pub pt_compensation: f32,
11187    #[doc = "EFI health status"]
11188    pub health: u8,
11189    #[doc = "Supply voltage to EFI sparking system.  Zero in this value means \"unknown\", so if the supply voltage really is zero volts use 0.0001 instead."]
11190    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
11191    pub ignition_voltage: f32,
11192    #[doc = "Fuel pressure. Zero in this value means \"unknown\", so if the fuel pressure really is zero kPa use 0.0001 instead."]
11193    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
11194    pub fuel_pressure: f32,
11195}
11196impl EFI_STATUS_DATA {
11197    pub const ENCODED_LEN: usize = 73usize;
11198    pub const DEFAULT: Self = Self {
11199        ecu_index: 0.0_f32,
11200        rpm: 0.0_f32,
11201        fuel_consumed: 0.0_f32,
11202        fuel_flow: 0.0_f32,
11203        engine_load: 0.0_f32,
11204        throttle_position: 0.0_f32,
11205        spark_dwell_time: 0.0_f32,
11206        barometric_pressure: 0.0_f32,
11207        intake_manifold_pressure: 0.0_f32,
11208        intake_manifold_temperature: 0.0_f32,
11209        cylinder_head_temperature: 0.0_f32,
11210        ignition_timing: 0.0_f32,
11211        injection_time: 0.0_f32,
11212        exhaust_gas_temperature: 0.0_f32,
11213        throttle_out: 0.0_f32,
11214        pt_compensation: 0.0_f32,
11215        health: 0_u8,
11216        ignition_voltage: 0.0_f32,
11217        fuel_pressure: 0.0_f32,
11218    };
11219    #[cfg(feature = "arbitrary")]
11220    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11221        use arbitrary::{Arbitrary, Unstructured};
11222        let mut buf = [0u8; 1024];
11223        rng.fill_bytes(&mut buf);
11224        let mut unstructured = Unstructured::new(&buf);
11225        Self::arbitrary(&mut unstructured).unwrap_or_default()
11226    }
11227}
11228impl Default for EFI_STATUS_DATA {
11229    fn default() -> Self {
11230        Self::DEFAULT.clone()
11231    }
11232}
11233impl MessageData for EFI_STATUS_DATA {
11234    type Message = MavMessage;
11235    const ID: u32 = 225u32;
11236    const NAME: &'static str = "EFI_STATUS";
11237    const EXTRA_CRC: u8 = 208u8;
11238    const ENCODED_LEN: usize = 73usize;
11239    fn deser(
11240        _version: MavlinkVersion,
11241        __input: &[u8],
11242    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11243        let avail_len = __input.len();
11244        let mut payload_buf = [0; Self::ENCODED_LEN];
11245        let mut buf = if avail_len < Self::ENCODED_LEN {
11246            payload_buf[0..avail_len].copy_from_slice(__input);
11247            Bytes::new(&payload_buf)
11248        } else {
11249            Bytes::new(__input)
11250        };
11251        let mut __struct = Self::default();
11252        __struct.ecu_index = buf.get_f32_le();
11253        __struct.rpm = buf.get_f32_le();
11254        __struct.fuel_consumed = buf.get_f32_le();
11255        __struct.fuel_flow = buf.get_f32_le();
11256        __struct.engine_load = buf.get_f32_le();
11257        __struct.throttle_position = buf.get_f32_le();
11258        __struct.spark_dwell_time = buf.get_f32_le();
11259        __struct.barometric_pressure = buf.get_f32_le();
11260        __struct.intake_manifold_pressure = buf.get_f32_le();
11261        __struct.intake_manifold_temperature = buf.get_f32_le();
11262        __struct.cylinder_head_temperature = buf.get_f32_le();
11263        __struct.ignition_timing = buf.get_f32_le();
11264        __struct.injection_time = buf.get_f32_le();
11265        __struct.exhaust_gas_temperature = buf.get_f32_le();
11266        __struct.throttle_out = buf.get_f32_le();
11267        __struct.pt_compensation = buf.get_f32_le();
11268        __struct.health = buf.get_u8();
11269        __struct.ignition_voltage = buf.get_f32_le();
11270        __struct.fuel_pressure = buf.get_f32_le();
11271        Ok(__struct)
11272    }
11273    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11274        let mut __tmp = BytesMut::new(bytes);
11275        #[allow(clippy::absurd_extreme_comparisons)]
11276        #[allow(unused_comparisons)]
11277        if __tmp.remaining() < Self::ENCODED_LEN {
11278            panic!(
11279                "buffer is too small (need {} bytes, but got {})",
11280                Self::ENCODED_LEN,
11281                __tmp.remaining(),
11282            )
11283        }
11284        __tmp.put_f32_le(self.ecu_index);
11285        __tmp.put_f32_le(self.rpm);
11286        __tmp.put_f32_le(self.fuel_consumed);
11287        __tmp.put_f32_le(self.fuel_flow);
11288        __tmp.put_f32_le(self.engine_load);
11289        __tmp.put_f32_le(self.throttle_position);
11290        __tmp.put_f32_le(self.spark_dwell_time);
11291        __tmp.put_f32_le(self.barometric_pressure);
11292        __tmp.put_f32_le(self.intake_manifold_pressure);
11293        __tmp.put_f32_le(self.intake_manifold_temperature);
11294        __tmp.put_f32_le(self.cylinder_head_temperature);
11295        __tmp.put_f32_le(self.ignition_timing);
11296        __tmp.put_f32_le(self.injection_time);
11297        __tmp.put_f32_le(self.exhaust_gas_temperature);
11298        __tmp.put_f32_le(self.throttle_out);
11299        __tmp.put_f32_le(self.pt_compensation);
11300        __tmp.put_u8(self.health);
11301        if matches!(version, MavlinkVersion::V2) {
11302            __tmp.put_f32_le(self.ignition_voltage);
11303            __tmp.put_f32_le(self.fuel_pressure);
11304            let len = __tmp.len();
11305            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11306        } else {
11307            __tmp.len()
11308        }
11309    }
11310}
11311#[doc = "Extended EKF state estimates for ASLUAVs."]
11312#[doc = ""]
11313#[doc = "ID: 8007"]
11314#[derive(Debug, Clone, PartialEq)]
11315#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11316#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11317pub struct EKF_EXT_DATA {
11318    #[doc = "Time since system start"]
11319    pub timestamp: u64,
11320    #[doc = "Magnitude of wind velocity (in lateral inertial plane)"]
11321    pub Windspeed: f32,
11322    #[doc = "Wind heading angle from North"]
11323    pub WindDir: f32,
11324    #[doc = "Z (Down) component of inertial wind velocity"]
11325    pub WindZ: f32,
11326    #[doc = "Magnitude of air velocity"]
11327    pub Airspeed: f32,
11328    #[doc = "Sideslip angle"]
11329    pub beta: f32,
11330    #[doc = "Angle of attack"]
11331    pub alpha: f32,
11332}
11333impl EKF_EXT_DATA {
11334    pub const ENCODED_LEN: usize = 32usize;
11335    pub const DEFAULT: Self = Self {
11336        timestamp: 0_u64,
11337        Windspeed: 0.0_f32,
11338        WindDir: 0.0_f32,
11339        WindZ: 0.0_f32,
11340        Airspeed: 0.0_f32,
11341        beta: 0.0_f32,
11342        alpha: 0.0_f32,
11343    };
11344    #[cfg(feature = "arbitrary")]
11345    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11346        use arbitrary::{Arbitrary, Unstructured};
11347        let mut buf = [0u8; 1024];
11348        rng.fill_bytes(&mut buf);
11349        let mut unstructured = Unstructured::new(&buf);
11350        Self::arbitrary(&mut unstructured).unwrap_or_default()
11351    }
11352}
11353impl Default for EKF_EXT_DATA {
11354    fn default() -> Self {
11355        Self::DEFAULT.clone()
11356    }
11357}
11358impl MessageData for EKF_EXT_DATA {
11359    type Message = MavMessage;
11360    const ID: u32 = 8007u32;
11361    const NAME: &'static str = "EKF_EXT";
11362    const EXTRA_CRC: u8 = 64u8;
11363    const ENCODED_LEN: usize = 32usize;
11364    fn deser(
11365        _version: MavlinkVersion,
11366        __input: &[u8],
11367    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11368        let avail_len = __input.len();
11369        let mut payload_buf = [0; Self::ENCODED_LEN];
11370        let mut buf = if avail_len < Self::ENCODED_LEN {
11371            payload_buf[0..avail_len].copy_from_slice(__input);
11372            Bytes::new(&payload_buf)
11373        } else {
11374            Bytes::new(__input)
11375        };
11376        let mut __struct = Self::default();
11377        __struct.timestamp = buf.get_u64_le();
11378        __struct.Windspeed = buf.get_f32_le();
11379        __struct.WindDir = buf.get_f32_le();
11380        __struct.WindZ = buf.get_f32_le();
11381        __struct.Airspeed = buf.get_f32_le();
11382        __struct.beta = buf.get_f32_le();
11383        __struct.alpha = buf.get_f32_le();
11384        Ok(__struct)
11385    }
11386    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11387        let mut __tmp = BytesMut::new(bytes);
11388        #[allow(clippy::absurd_extreme_comparisons)]
11389        #[allow(unused_comparisons)]
11390        if __tmp.remaining() < Self::ENCODED_LEN {
11391            panic!(
11392                "buffer is too small (need {} bytes, but got {})",
11393                Self::ENCODED_LEN,
11394                __tmp.remaining(),
11395            )
11396        }
11397        __tmp.put_u64_le(self.timestamp);
11398        __tmp.put_f32_le(self.Windspeed);
11399        __tmp.put_f32_le(self.WindDir);
11400        __tmp.put_f32_le(self.WindZ);
11401        __tmp.put_f32_le(self.Airspeed);
11402        __tmp.put_f32_le(self.beta);
11403        __tmp.put_f32_le(self.alpha);
11404        if matches!(version, MavlinkVersion::V2) {
11405            let len = __tmp.len();
11406            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11407        } else {
11408            __tmp.len()
11409        }
11410    }
11411}
11412#[doc = "Data packet for images sent using the Image Transmission Protocol: <https://mavlink.io/en/services/image_transmission.html>."]
11413#[doc = ""]
11414#[doc = "ID: 131"]
11415#[derive(Debug, Clone, PartialEq)]
11416#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11417#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11418pub struct ENCAPSULATED_DATA_DATA {
11419    #[doc = "sequence number (starting with 0 on every transmission)"]
11420    pub seqnr: u16,
11421    #[doc = "image data bytes"]
11422    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11423    pub data: [u8; 253],
11424}
11425impl ENCAPSULATED_DATA_DATA {
11426    pub const ENCODED_LEN: usize = 255usize;
11427    pub const DEFAULT: Self = Self {
11428        seqnr: 0_u16,
11429        data: [0_u8; 253usize],
11430    };
11431    #[cfg(feature = "arbitrary")]
11432    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11433        use arbitrary::{Arbitrary, Unstructured};
11434        let mut buf = [0u8; 1024];
11435        rng.fill_bytes(&mut buf);
11436        let mut unstructured = Unstructured::new(&buf);
11437        Self::arbitrary(&mut unstructured).unwrap_or_default()
11438    }
11439}
11440impl Default for ENCAPSULATED_DATA_DATA {
11441    fn default() -> Self {
11442        Self::DEFAULT.clone()
11443    }
11444}
11445impl MessageData for ENCAPSULATED_DATA_DATA {
11446    type Message = MavMessage;
11447    const ID: u32 = 131u32;
11448    const NAME: &'static str = "ENCAPSULATED_DATA";
11449    const EXTRA_CRC: u8 = 223u8;
11450    const ENCODED_LEN: usize = 255usize;
11451    fn deser(
11452        _version: MavlinkVersion,
11453        __input: &[u8],
11454    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11455        let avail_len = __input.len();
11456        let mut payload_buf = [0; Self::ENCODED_LEN];
11457        let mut buf = if avail_len < Self::ENCODED_LEN {
11458            payload_buf[0..avail_len].copy_from_slice(__input);
11459            Bytes::new(&payload_buf)
11460        } else {
11461            Bytes::new(__input)
11462        };
11463        let mut __struct = Self::default();
11464        __struct.seqnr = buf.get_u16_le();
11465        for v in &mut __struct.data {
11466            let val = buf.get_u8();
11467            *v = val;
11468        }
11469        Ok(__struct)
11470    }
11471    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11472        let mut __tmp = BytesMut::new(bytes);
11473        #[allow(clippy::absurd_extreme_comparisons)]
11474        #[allow(unused_comparisons)]
11475        if __tmp.remaining() < Self::ENCODED_LEN {
11476            panic!(
11477                "buffer is too small (need {} bytes, but got {})",
11478                Self::ENCODED_LEN,
11479                __tmp.remaining(),
11480            )
11481        }
11482        __tmp.put_u16_le(self.seqnr);
11483        for val in &self.data {
11484            __tmp.put_u8(*val);
11485        }
11486        if matches!(version, MavlinkVersion::V2) {
11487            let len = __tmp.len();
11488            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11489        } else {
11490            __tmp.len()
11491        }
11492    }
11493}
11494#[doc = "ESC information for lower rate streaming. Recommended streaming rate 1Hz. See ESC_STATUS for higher-rate ESC data."]
11495#[doc = ""]
11496#[doc = "ID: 290"]
11497#[derive(Debug, Clone, PartialEq)]
11498#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11499#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11500pub struct ESC_INFO_DATA {
11501    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude the number."]
11502    pub time_usec: u64,
11503    #[doc = "Number of reported errors by each ESC since boot."]
11504    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11505    pub error_count: [u32; 4],
11506    #[doc = "Counter of data packets received."]
11507    pub counter: u16,
11508    #[doc = "Bitmap of ESC failure flags."]
11509    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11510    pub failure_flags: [u16; 4],
11511    #[doc = "Temperature of each ESC. INT16_MAX: if data not supplied by ESC."]
11512    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11513    pub temperature: [i16; 4],
11514    #[doc = "Index of the first ESC in this message. minValue = 0, maxValue = 60, increment = 4."]
11515    pub index: u8,
11516    #[doc = "Total number of ESCs in all messages of this type. Message fields with an index higher than this should be ignored because they contain invalid data."]
11517    pub count: u8,
11518    #[doc = "Connection type protocol for all ESC."]
11519    pub connection_type: EscConnectionType,
11520    #[doc = "Information regarding online/offline status of each ESC."]
11521    pub info: u8,
11522}
11523impl ESC_INFO_DATA {
11524    pub const ENCODED_LEN: usize = 46usize;
11525    pub const DEFAULT: Self = Self {
11526        time_usec: 0_u64,
11527        error_count: [0_u32; 4usize],
11528        counter: 0_u16,
11529        failure_flags: [0_u16; 4usize],
11530        temperature: [0_i16; 4usize],
11531        index: 0_u8,
11532        count: 0_u8,
11533        connection_type: EscConnectionType::DEFAULT,
11534        info: 0_u8,
11535    };
11536    #[cfg(feature = "arbitrary")]
11537    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11538        use arbitrary::{Arbitrary, Unstructured};
11539        let mut buf = [0u8; 1024];
11540        rng.fill_bytes(&mut buf);
11541        let mut unstructured = Unstructured::new(&buf);
11542        Self::arbitrary(&mut unstructured).unwrap_or_default()
11543    }
11544}
11545impl Default for ESC_INFO_DATA {
11546    fn default() -> Self {
11547        Self::DEFAULT.clone()
11548    }
11549}
11550impl MessageData for ESC_INFO_DATA {
11551    type Message = MavMessage;
11552    const ID: u32 = 290u32;
11553    const NAME: &'static str = "ESC_INFO";
11554    const EXTRA_CRC: u8 = 251u8;
11555    const ENCODED_LEN: usize = 46usize;
11556    fn deser(
11557        _version: MavlinkVersion,
11558        __input: &[u8],
11559    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11560        let avail_len = __input.len();
11561        let mut payload_buf = [0; Self::ENCODED_LEN];
11562        let mut buf = if avail_len < Self::ENCODED_LEN {
11563            payload_buf[0..avail_len].copy_from_slice(__input);
11564            Bytes::new(&payload_buf)
11565        } else {
11566            Bytes::new(__input)
11567        };
11568        let mut __struct = Self::default();
11569        __struct.time_usec = buf.get_u64_le();
11570        for v in &mut __struct.error_count {
11571            let val = buf.get_u32_le();
11572            *v = val;
11573        }
11574        __struct.counter = buf.get_u16_le();
11575        for v in &mut __struct.failure_flags {
11576            let val = buf.get_u16_le();
11577            *v = val;
11578        }
11579        for v in &mut __struct.temperature {
11580            let val = buf.get_i16_le();
11581            *v = val;
11582        }
11583        __struct.index = buf.get_u8();
11584        __struct.count = buf.get_u8();
11585        let tmp = buf.get_u8();
11586        __struct.connection_type =
11587            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
11588                enum_type: "EscConnectionType",
11589                value: tmp as u32,
11590            })?;
11591        __struct.info = buf.get_u8();
11592        Ok(__struct)
11593    }
11594    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11595        let mut __tmp = BytesMut::new(bytes);
11596        #[allow(clippy::absurd_extreme_comparisons)]
11597        #[allow(unused_comparisons)]
11598        if __tmp.remaining() < Self::ENCODED_LEN {
11599            panic!(
11600                "buffer is too small (need {} bytes, but got {})",
11601                Self::ENCODED_LEN,
11602                __tmp.remaining(),
11603            )
11604        }
11605        __tmp.put_u64_le(self.time_usec);
11606        for val in &self.error_count {
11607            __tmp.put_u32_le(*val);
11608        }
11609        __tmp.put_u16_le(self.counter);
11610        for val in &self.failure_flags {
11611            __tmp.put_u16_le(*val);
11612        }
11613        for val in &self.temperature {
11614            __tmp.put_i16_le(*val);
11615        }
11616        __tmp.put_u8(self.index);
11617        __tmp.put_u8(self.count);
11618        __tmp.put_u8(self.connection_type as u8);
11619        __tmp.put_u8(self.info);
11620        if matches!(version, MavlinkVersion::V2) {
11621            let len = __tmp.len();
11622            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11623        } else {
11624            __tmp.len()
11625        }
11626    }
11627}
11628#[doc = "ESC information for higher rate streaming. Recommended streaming rate is ~10 Hz. Information that changes more slowly is sent in ESC_INFO. It should typically only be streamed on high-bandwidth links (i.e. to a companion computer)."]
11629#[doc = ""]
11630#[doc = "ID: 291"]
11631#[derive(Debug, Clone, PartialEq)]
11632#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11633#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11634pub struct ESC_STATUS_DATA {
11635    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude the number."]
11636    pub time_usec: u64,
11637    #[doc = "Reported motor RPM from each ESC (negative for reverse rotation)."]
11638    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11639    pub rpm: [i32; 4],
11640    #[doc = "Voltage measured from each ESC."]
11641    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11642    pub voltage: [f32; 4],
11643    #[doc = "Current measured from each ESC."]
11644    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11645    pub current: [f32; 4],
11646    #[doc = "Index of the first ESC in this message. minValue = 0, maxValue = 60, increment = 4."]
11647    pub index: u8,
11648}
11649impl ESC_STATUS_DATA {
11650    pub const ENCODED_LEN: usize = 57usize;
11651    pub const DEFAULT: Self = Self {
11652        time_usec: 0_u64,
11653        rpm: [0_i32; 4usize],
11654        voltage: [0.0_f32; 4usize],
11655        current: [0.0_f32; 4usize],
11656        index: 0_u8,
11657    };
11658    #[cfg(feature = "arbitrary")]
11659    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11660        use arbitrary::{Arbitrary, Unstructured};
11661        let mut buf = [0u8; 1024];
11662        rng.fill_bytes(&mut buf);
11663        let mut unstructured = Unstructured::new(&buf);
11664        Self::arbitrary(&mut unstructured).unwrap_or_default()
11665    }
11666}
11667impl Default for ESC_STATUS_DATA {
11668    fn default() -> Self {
11669        Self::DEFAULT.clone()
11670    }
11671}
11672impl MessageData for ESC_STATUS_DATA {
11673    type Message = MavMessage;
11674    const ID: u32 = 291u32;
11675    const NAME: &'static str = "ESC_STATUS";
11676    const EXTRA_CRC: u8 = 10u8;
11677    const ENCODED_LEN: usize = 57usize;
11678    fn deser(
11679        _version: MavlinkVersion,
11680        __input: &[u8],
11681    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11682        let avail_len = __input.len();
11683        let mut payload_buf = [0; Self::ENCODED_LEN];
11684        let mut buf = if avail_len < Self::ENCODED_LEN {
11685            payload_buf[0..avail_len].copy_from_slice(__input);
11686            Bytes::new(&payload_buf)
11687        } else {
11688            Bytes::new(__input)
11689        };
11690        let mut __struct = Self::default();
11691        __struct.time_usec = buf.get_u64_le();
11692        for v in &mut __struct.rpm {
11693            let val = buf.get_i32_le();
11694            *v = val;
11695        }
11696        for v in &mut __struct.voltage {
11697            let val = buf.get_f32_le();
11698            *v = val;
11699        }
11700        for v in &mut __struct.current {
11701            let val = buf.get_f32_le();
11702            *v = val;
11703        }
11704        __struct.index = buf.get_u8();
11705        Ok(__struct)
11706    }
11707    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11708        let mut __tmp = BytesMut::new(bytes);
11709        #[allow(clippy::absurd_extreme_comparisons)]
11710        #[allow(unused_comparisons)]
11711        if __tmp.remaining() < Self::ENCODED_LEN {
11712            panic!(
11713                "buffer is too small (need {} bytes, but got {})",
11714                Self::ENCODED_LEN,
11715                __tmp.remaining(),
11716            )
11717        }
11718        __tmp.put_u64_le(self.time_usec);
11719        for val in &self.rpm {
11720            __tmp.put_i32_le(*val);
11721        }
11722        for val in &self.voltage {
11723            __tmp.put_f32_le(*val);
11724        }
11725        for val in &self.current {
11726            __tmp.put_f32_le(*val);
11727        }
11728        __tmp.put_u8(self.index);
11729        if matches!(version, MavlinkVersion::V2) {
11730            let len = __tmp.len();
11731            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11732        } else {
11733            __tmp.len()
11734        }
11735    }
11736}
11737#[doc = "Estimator status message including flags, innovation test ratios and estimated accuracies. The flags message is an integer bitmask containing information on which EKF outputs are valid. See the ESTIMATOR_STATUS_FLAGS enum definition for further information. The innovation test ratios show the magnitude of the sensor innovation divided by the innovation check threshold. Under normal operation the innovation test ratios should be below 0.5 with occasional values up to 1.0. Values greater than 1.0 should be rare under normal operation and indicate that a measurement has been rejected by the filter. The user should be notified if an innovation test ratio greater than 1.0 is recorded. Notifications for values in the range between 0.5 and 1.0 should be optional and controllable by the user."]
11738#[doc = ""]
11739#[doc = "ID: 230"]
11740#[derive(Debug, Clone, PartialEq)]
11741#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11742#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11743pub struct ESTIMATOR_STATUS_DATA {
11744    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
11745    pub time_usec: u64,
11746    #[doc = "Velocity innovation test ratio"]
11747    pub vel_ratio: f32,
11748    #[doc = "Horizontal position innovation test ratio"]
11749    pub pos_horiz_ratio: f32,
11750    #[doc = "Vertical position innovation test ratio"]
11751    pub pos_vert_ratio: f32,
11752    #[doc = "Magnetometer innovation test ratio"]
11753    pub mag_ratio: f32,
11754    #[doc = "Height above terrain innovation test ratio"]
11755    pub hagl_ratio: f32,
11756    #[doc = "True airspeed innovation test ratio"]
11757    pub tas_ratio: f32,
11758    #[doc = "Horizontal position 1-STD accuracy relative to the EKF local origin"]
11759    pub pos_horiz_accuracy: f32,
11760    #[doc = "Vertical position 1-STD accuracy relative to the EKF local origin"]
11761    pub pos_vert_accuracy: f32,
11762    #[doc = "Bitmap indicating which EKF outputs are valid."]
11763    pub flags: EstimatorStatusFlags,
11764}
11765impl ESTIMATOR_STATUS_DATA {
11766    pub const ENCODED_LEN: usize = 42usize;
11767    pub const DEFAULT: Self = Self {
11768        time_usec: 0_u64,
11769        vel_ratio: 0.0_f32,
11770        pos_horiz_ratio: 0.0_f32,
11771        pos_vert_ratio: 0.0_f32,
11772        mag_ratio: 0.0_f32,
11773        hagl_ratio: 0.0_f32,
11774        tas_ratio: 0.0_f32,
11775        pos_horiz_accuracy: 0.0_f32,
11776        pos_vert_accuracy: 0.0_f32,
11777        flags: EstimatorStatusFlags::DEFAULT,
11778    };
11779    #[cfg(feature = "arbitrary")]
11780    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11781        use arbitrary::{Arbitrary, Unstructured};
11782        let mut buf = [0u8; 1024];
11783        rng.fill_bytes(&mut buf);
11784        let mut unstructured = Unstructured::new(&buf);
11785        Self::arbitrary(&mut unstructured).unwrap_or_default()
11786    }
11787}
11788impl Default for ESTIMATOR_STATUS_DATA {
11789    fn default() -> Self {
11790        Self::DEFAULT.clone()
11791    }
11792}
11793impl MessageData for ESTIMATOR_STATUS_DATA {
11794    type Message = MavMessage;
11795    const ID: u32 = 230u32;
11796    const NAME: &'static str = "ESTIMATOR_STATUS";
11797    const EXTRA_CRC: u8 = 163u8;
11798    const ENCODED_LEN: usize = 42usize;
11799    fn deser(
11800        _version: MavlinkVersion,
11801        __input: &[u8],
11802    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11803        let avail_len = __input.len();
11804        let mut payload_buf = [0; Self::ENCODED_LEN];
11805        let mut buf = if avail_len < Self::ENCODED_LEN {
11806            payload_buf[0..avail_len].copy_from_slice(__input);
11807            Bytes::new(&payload_buf)
11808        } else {
11809            Bytes::new(__input)
11810        };
11811        let mut __struct = Self::default();
11812        __struct.time_usec = buf.get_u64_le();
11813        __struct.vel_ratio = buf.get_f32_le();
11814        __struct.pos_horiz_ratio = buf.get_f32_le();
11815        __struct.pos_vert_ratio = buf.get_f32_le();
11816        __struct.mag_ratio = buf.get_f32_le();
11817        __struct.hagl_ratio = buf.get_f32_le();
11818        __struct.tas_ratio = buf.get_f32_le();
11819        __struct.pos_horiz_accuracy = buf.get_f32_le();
11820        __struct.pos_vert_accuracy = buf.get_f32_le();
11821        let tmp = buf.get_u16_le();
11822        __struct.flags = EstimatorStatusFlags::from_bits(tmp & EstimatorStatusFlags::all().bits())
11823            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
11824                flag_type: "EstimatorStatusFlags",
11825                value: tmp as u32,
11826            })?;
11827        Ok(__struct)
11828    }
11829    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11830        let mut __tmp = BytesMut::new(bytes);
11831        #[allow(clippy::absurd_extreme_comparisons)]
11832        #[allow(unused_comparisons)]
11833        if __tmp.remaining() < Self::ENCODED_LEN {
11834            panic!(
11835                "buffer is too small (need {} bytes, but got {})",
11836                Self::ENCODED_LEN,
11837                __tmp.remaining(),
11838            )
11839        }
11840        __tmp.put_u64_le(self.time_usec);
11841        __tmp.put_f32_le(self.vel_ratio);
11842        __tmp.put_f32_le(self.pos_horiz_ratio);
11843        __tmp.put_f32_le(self.pos_vert_ratio);
11844        __tmp.put_f32_le(self.mag_ratio);
11845        __tmp.put_f32_le(self.hagl_ratio);
11846        __tmp.put_f32_le(self.tas_ratio);
11847        __tmp.put_f32_le(self.pos_horiz_accuracy);
11848        __tmp.put_f32_le(self.pos_vert_accuracy);
11849        __tmp.put_u16_le(self.flags.bits());
11850        if matches!(version, MavlinkVersion::V2) {
11851            let len = __tmp.len();
11852            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11853        } else {
11854            __tmp.len()
11855        }
11856    }
11857}
11858#[doc = "Event message. Each new event from a particular component gets a new sequence number. The same message might be sent multiple times if (re-)requested. Most events are broadcast, some can be specific to a target component (as receivers keep track of the sequence for missed events, all events need to be broadcast. Thus we use destination_component instead of target_component)."]
11859#[doc = ""]
11860#[doc = "ID: 410"]
11861#[derive(Debug, Clone, PartialEq)]
11862#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11863#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11864pub struct EVENT_DATA {
11865    #[doc = "Event ID (as defined in the component metadata)"]
11866    pub id: u32,
11867    #[doc = "Timestamp (time since system boot when the event happened)."]
11868    pub event_time_boot_ms: u32,
11869    #[doc = "Sequence number."]
11870    pub sequence: u16,
11871    #[doc = "Component ID"]
11872    pub destination_component: u8,
11873    #[doc = "System ID"]
11874    pub destination_system: u8,
11875    #[doc = "Log levels: 4 bits MSB: internal (for logging purposes), 4 bits LSB: external. Levels: Emergency = 0, Alert = 1, Critical = 2, Error = 3, Warning = 4, Notice = 5, Info = 6, Debug = 7, Protocol = 8, Disabled = 9"]
11876    pub log_levels: u8,
11877    #[doc = "Arguments (depend on event ID)."]
11878    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11879    pub arguments: [u8; 40],
11880}
11881impl EVENT_DATA {
11882    pub const ENCODED_LEN: usize = 53usize;
11883    pub const DEFAULT: Self = Self {
11884        id: 0_u32,
11885        event_time_boot_ms: 0_u32,
11886        sequence: 0_u16,
11887        destination_component: 0_u8,
11888        destination_system: 0_u8,
11889        log_levels: 0_u8,
11890        arguments: [0_u8; 40usize],
11891    };
11892    #[cfg(feature = "arbitrary")]
11893    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11894        use arbitrary::{Arbitrary, Unstructured};
11895        let mut buf = [0u8; 1024];
11896        rng.fill_bytes(&mut buf);
11897        let mut unstructured = Unstructured::new(&buf);
11898        Self::arbitrary(&mut unstructured).unwrap_or_default()
11899    }
11900}
11901impl Default for EVENT_DATA {
11902    fn default() -> Self {
11903        Self::DEFAULT.clone()
11904    }
11905}
11906impl MessageData for EVENT_DATA {
11907    type Message = MavMessage;
11908    const ID: u32 = 410u32;
11909    const NAME: &'static str = "EVENT";
11910    const EXTRA_CRC: u8 = 160u8;
11911    const ENCODED_LEN: usize = 53usize;
11912    fn deser(
11913        _version: MavlinkVersion,
11914        __input: &[u8],
11915    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11916        let avail_len = __input.len();
11917        let mut payload_buf = [0; Self::ENCODED_LEN];
11918        let mut buf = if avail_len < Self::ENCODED_LEN {
11919            payload_buf[0..avail_len].copy_from_slice(__input);
11920            Bytes::new(&payload_buf)
11921        } else {
11922            Bytes::new(__input)
11923        };
11924        let mut __struct = Self::default();
11925        __struct.id = buf.get_u32_le();
11926        __struct.event_time_boot_ms = buf.get_u32_le();
11927        __struct.sequence = buf.get_u16_le();
11928        __struct.destination_component = buf.get_u8();
11929        __struct.destination_system = buf.get_u8();
11930        __struct.log_levels = buf.get_u8();
11931        for v in &mut __struct.arguments {
11932            let val = buf.get_u8();
11933            *v = val;
11934        }
11935        Ok(__struct)
11936    }
11937    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11938        let mut __tmp = BytesMut::new(bytes);
11939        #[allow(clippy::absurd_extreme_comparisons)]
11940        #[allow(unused_comparisons)]
11941        if __tmp.remaining() < Self::ENCODED_LEN {
11942            panic!(
11943                "buffer is too small (need {} bytes, but got {})",
11944                Self::ENCODED_LEN,
11945                __tmp.remaining(),
11946            )
11947        }
11948        __tmp.put_u32_le(self.id);
11949        __tmp.put_u32_le(self.event_time_boot_ms);
11950        __tmp.put_u16_le(self.sequence);
11951        __tmp.put_u8(self.destination_component);
11952        __tmp.put_u8(self.destination_system);
11953        __tmp.put_u8(self.log_levels);
11954        for val in &self.arguments {
11955            __tmp.put_u8(*val);
11956        }
11957        if matches!(version, MavlinkVersion::V2) {
11958            let len = __tmp.len();
11959            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11960        } else {
11961            __tmp.len()
11962        }
11963    }
11964}
11965#[doc = "Provides state for additional features."]
11966#[doc = ""]
11967#[doc = "ID: 245"]
11968#[derive(Debug, Clone, PartialEq)]
11969#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11970#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11971pub struct EXTENDED_SYS_STATE_DATA {
11972    #[doc = "The VTOL state if applicable. Is set to MAV_VTOL_STATE_UNDEFINED if UAV is not in VTOL configuration."]
11973    pub vtol_state: MavVtolState,
11974    #[doc = "The landed state. Is set to MAV_LANDED_STATE_UNDEFINED if landed state is unknown."]
11975    pub landed_state: MavLandedState,
11976}
11977impl EXTENDED_SYS_STATE_DATA {
11978    pub const ENCODED_LEN: usize = 2usize;
11979    pub const DEFAULT: Self = Self {
11980        vtol_state: MavVtolState::DEFAULT,
11981        landed_state: MavLandedState::DEFAULT,
11982    };
11983    #[cfg(feature = "arbitrary")]
11984    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11985        use arbitrary::{Arbitrary, Unstructured};
11986        let mut buf = [0u8; 1024];
11987        rng.fill_bytes(&mut buf);
11988        let mut unstructured = Unstructured::new(&buf);
11989        Self::arbitrary(&mut unstructured).unwrap_or_default()
11990    }
11991}
11992impl Default for EXTENDED_SYS_STATE_DATA {
11993    fn default() -> Self {
11994        Self::DEFAULT.clone()
11995    }
11996}
11997impl MessageData for EXTENDED_SYS_STATE_DATA {
11998    type Message = MavMessage;
11999    const ID: u32 = 245u32;
12000    const NAME: &'static str = "EXTENDED_SYS_STATE";
12001    const EXTRA_CRC: u8 = 130u8;
12002    const ENCODED_LEN: usize = 2usize;
12003    fn deser(
12004        _version: MavlinkVersion,
12005        __input: &[u8],
12006    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12007        let avail_len = __input.len();
12008        let mut payload_buf = [0; Self::ENCODED_LEN];
12009        let mut buf = if avail_len < Self::ENCODED_LEN {
12010            payload_buf[0..avail_len].copy_from_slice(__input);
12011            Bytes::new(&payload_buf)
12012        } else {
12013            Bytes::new(__input)
12014        };
12015        let mut __struct = Self::default();
12016        let tmp = buf.get_u8();
12017        __struct.vtol_state =
12018            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
12019                enum_type: "MavVtolState",
12020                value: tmp as u32,
12021            })?;
12022        let tmp = buf.get_u8();
12023        __struct.landed_state =
12024            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
12025                enum_type: "MavLandedState",
12026                value: tmp as u32,
12027            })?;
12028        Ok(__struct)
12029    }
12030    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12031        let mut __tmp = BytesMut::new(bytes);
12032        #[allow(clippy::absurd_extreme_comparisons)]
12033        #[allow(unused_comparisons)]
12034        if __tmp.remaining() < Self::ENCODED_LEN {
12035            panic!(
12036                "buffer is too small (need {} bytes, but got {})",
12037                Self::ENCODED_LEN,
12038                __tmp.remaining(),
12039            )
12040        }
12041        __tmp.put_u8(self.vtol_state as u8);
12042        __tmp.put_u8(self.landed_state as u8);
12043        if matches!(version, MavlinkVersion::V2) {
12044            let len = __tmp.len();
12045            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12046        } else {
12047            __tmp.len()
12048        }
12049    }
12050}
12051#[doc = "Status of geo-fencing. Sent in extended status stream when fencing enabled."]
12052#[doc = ""]
12053#[doc = "ID: 162"]
12054#[derive(Debug, Clone, PartialEq)]
12055#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12056#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12057pub struct FENCE_STATUS_DATA {
12058    #[doc = "Time (since boot) of last breach."]
12059    pub breach_time: u32,
12060    #[doc = "Number of fence breaches."]
12061    pub breach_count: u16,
12062    #[doc = "Breach status (0 if currently inside fence, 1 if outside)."]
12063    pub breach_status: u8,
12064    #[doc = "Last breach type."]
12065    pub breach_type: FenceBreach,
12066    #[doc = "Active action to prevent fence breach"]
12067    #[cfg_attr(feature = "serde", serde(default))]
12068    pub breach_mitigation: FenceMitigate,
12069}
12070impl FENCE_STATUS_DATA {
12071    pub const ENCODED_LEN: usize = 9usize;
12072    pub const DEFAULT: Self = Self {
12073        breach_time: 0_u32,
12074        breach_count: 0_u16,
12075        breach_status: 0_u8,
12076        breach_type: FenceBreach::DEFAULT,
12077        breach_mitigation: FenceMitigate::DEFAULT,
12078    };
12079    #[cfg(feature = "arbitrary")]
12080    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12081        use arbitrary::{Arbitrary, Unstructured};
12082        let mut buf = [0u8; 1024];
12083        rng.fill_bytes(&mut buf);
12084        let mut unstructured = Unstructured::new(&buf);
12085        Self::arbitrary(&mut unstructured).unwrap_or_default()
12086    }
12087}
12088impl Default for FENCE_STATUS_DATA {
12089    fn default() -> Self {
12090        Self::DEFAULT.clone()
12091    }
12092}
12093impl MessageData for FENCE_STATUS_DATA {
12094    type Message = MavMessage;
12095    const ID: u32 = 162u32;
12096    const NAME: &'static str = "FENCE_STATUS";
12097    const EXTRA_CRC: u8 = 189u8;
12098    const ENCODED_LEN: usize = 9usize;
12099    fn deser(
12100        _version: MavlinkVersion,
12101        __input: &[u8],
12102    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12103        let avail_len = __input.len();
12104        let mut payload_buf = [0; Self::ENCODED_LEN];
12105        let mut buf = if avail_len < Self::ENCODED_LEN {
12106            payload_buf[0..avail_len].copy_from_slice(__input);
12107            Bytes::new(&payload_buf)
12108        } else {
12109            Bytes::new(__input)
12110        };
12111        let mut __struct = Self::default();
12112        __struct.breach_time = buf.get_u32_le();
12113        __struct.breach_count = buf.get_u16_le();
12114        __struct.breach_status = buf.get_u8();
12115        let tmp = buf.get_u8();
12116        __struct.breach_type =
12117            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
12118                enum_type: "FenceBreach",
12119                value: tmp as u32,
12120            })?;
12121        let tmp = buf.get_u8();
12122        __struct.breach_mitigation =
12123            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
12124                enum_type: "FenceMitigate",
12125                value: tmp as u32,
12126            })?;
12127        Ok(__struct)
12128    }
12129    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12130        let mut __tmp = BytesMut::new(bytes);
12131        #[allow(clippy::absurd_extreme_comparisons)]
12132        #[allow(unused_comparisons)]
12133        if __tmp.remaining() < Self::ENCODED_LEN {
12134            panic!(
12135                "buffer is too small (need {} bytes, but got {})",
12136                Self::ENCODED_LEN,
12137                __tmp.remaining(),
12138            )
12139        }
12140        __tmp.put_u32_le(self.breach_time);
12141        __tmp.put_u16_le(self.breach_count);
12142        __tmp.put_u8(self.breach_status);
12143        __tmp.put_u8(self.breach_type as u8);
12144        if matches!(version, MavlinkVersion::V2) {
12145            __tmp.put_u8(self.breach_mitigation as u8);
12146            let len = __tmp.len();
12147            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12148        } else {
12149            __tmp.len()
12150        }
12151    }
12152}
12153#[doc = "File transfer protocol message: <https://mavlink.io/en/services/ftp.html>."]
12154#[doc = ""]
12155#[doc = "ID: 110"]
12156#[derive(Debug, Clone, PartialEq)]
12157#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12158#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12159pub struct FILE_TRANSFER_PROTOCOL_DATA {
12160    #[doc = "Network ID (0 for broadcast)"]
12161    pub target_network: u8,
12162    #[doc = "System ID (0 for broadcast)"]
12163    pub target_system: u8,
12164    #[doc = "Component ID (0 for broadcast)"]
12165    pub target_component: u8,
12166    #[doc = "Variable length payload. The length is defined by the remaining message length when subtracting the header and other fields. The content/format of this block is defined in <https://mavlink.io/en/services/ftp.html>."]
12167    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12168    pub payload: [u8; 251],
12169}
12170impl FILE_TRANSFER_PROTOCOL_DATA {
12171    pub const ENCODED_LEN: usize = 254usize;
12172    pub const DEFAULT: Self = Self {
12173        target_network: 0_u8,
12174        target_system: 0_u8,
12175        target_component: 0_u8,
12176        payload: [0_u8; 251usize],
12177    };
12178    #[cfg(feature = "arbitrary")]
12179    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12180        use arbitrary::{Arbitrary, Unstructured};
12181        let mut buf = [0u8; 1024];
12182        rng.fill_bytes(&mut buf);
12183        let mut unstructured = Unstructured::new(&buf);
12184        Self::arbitrary(&mut unstructured).unwrap_or_default()
12185    }
12186}
12187impl Default for FILE_TRANSFER_PROTOCOL_DATA {
12188    fn default() -> Self {
12189        Self::DEFAULT.clone()
12190    }
12191}
12192impl MessageData for FILE_TRANSFER_PROTOCOL_DATA {
12193    type Message = MavMessage;
12194    const ID: u32 = 110u32;
12195    const NAME: &'static str = "FILE_TRANSFER_PROTOCOL";
12196    const EXTRA_CRC: u8 = 84u8;
12197    const ENCODED_LEN: usize = 254usize;
12198    fn deser(
12199        _version: MavlinkVersion,
12200        __input: &[u8],
12201    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12202        let avail_len = __input.len();
12203        let mut payload_buf = [0; Self::ENCODED_LEN];
12204        let mut buf = if avail_len < Self::ENCODED_LEN {
12205            payload_buf[0..avail_len].copy_from_slice(__input);
12206            Bytes::new(&payload_buf)
12207        } else {
12208            Bytes::new(__input)
12209        };
12210        let mut __struct = Self::default();
12211        __struct.target_network = buf.get_u8();
12212        __struct.target_system = buf.get_u8();
12213        __struct.target_component = buf.get_u8();
12214        for v in &mut __struct.payload {
12215            let val = buf.get_u8();
12216            *v = val;
12217        }
12218        Ok(__struct)
12219    }
12220    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12221        let mut __tmp = BytesMut::new(bytes);
12222        #[allow(clippy::absurd_extreme_comparisons)]
12223        #[allow(unused_comparisons)]
12224        if __tmp.remaining() < Self::ENCODED_LEN {
12225            panic!(
12226                "buffer is too small (need {} bytes, but got {})",
12227                Self::ENCODED_LEN,
12228                __tmp.remaining(),
12229            )
12230        }
12231        __tmp.put_u8(self.target_network);
12232        __tmp.put_u8(self.target_system);
12233        __tmp.put_u8(self.target_component);
12234        for val in &self.payload {
12235            __tmp.put_u8(*val);
12236        }
12237        if matches!(version, MavlinkVersion::V2) {
12238            let len = __tmp.len();
12239            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12240        } else {
12241            __tmp.len()
12242        }
12243    }
12244}
12245#[doc = "Flight information.         This includes time since boot for arm, takeoff, and land, and a flight number.         Takeoff and landing values reset to zero on arm.         This can be requested using MAV_CMD_REQUEST_MESSAGE.         Note, some fields are misnamed - timestamps are from boot (not UTC) and the flight_uuid is a sequence number."]
12246#[doc = ""]
12247#[doc = "ID: 264"]
12248#[derive(Debug, Clone, PartialEq)]
12249#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12250#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12251pub struct FLIGHT_INFORMATION_DATA {
12252    #[doc = "Timestamp at arming (since system boot). Set to 0 on boot. Set value on arming. Note, field is misnamed UTC."]
12253    pub arming_time_utc: u64,
12254    #[doc = "Timestamp at takeoff (since system boot). Set to 0 at boot and on arming. Note, field is misnamed UTC."]
12255    pub takeoff_time_utc: u64,
12256    #[doc = "Flight number. Note, field is misnamed UUID."]
12257    pub flight_uuid: u64,
12258    #[doc = "Timestamp (time since system boot)."]
12259    pub time_boot_ms: u32,
12260    #[doc = "Timestamp at landing (in ms since system boot). Set to 0 at boot and on arming."]
12261    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
12262    pub landing_time: u32,
12263}
12264impl FLIGHT_INFORMATION_DATA {
12265    pub const ENCODED_LEN: usize = 32usize;
12266    pub const DEFAULT: Self = Self {
12267        arming_time_utc: 0_u64,
12268        takeoff_time_utc: 0_u64,
12269        flight_uuid: 0_u64,
12270        time_boot_ms: 0_u32,
12271        landing_time: 0_u32,
12272    };
12273    #[cfg(feature = "arbitrary")]
12274    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12275        use arbitrary::{Arbitrary, Unstructured};
12276        let mut buf = [0u8; 1024];
12277        rng.fill_bytes(&mut buf);
12278        let mut unstructured = Unstructured::new(&buf);
12279        Self::arbitrary(&mut unstructured).unwrap_or_default()
12280    }
12281}
12282impl Default for FLIGHT_INFORMATION_DATA {
12283    fn default() -> Self {
12284        Self::DEFAULT.clone()
12285    }
12286}
12287impl MessageData for FLIGHT_INFORMATION_DATA {
12288    type Message = MavMessage;
12289    const ID: u32 = 264u32;
12290    const NAME: &'static str = "FLIGHT_INFORMATION";
12291    const EXTRA_CRC: u8 = 49u8;
12292    const ENCODED_LEN: usize = 32usize;
12293    fn deser(
12294        _version: MavlinkVersion,
12295        __input: &[u8],
12296    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12297        let avail_len = __input.len();
12298        let mut payload_buf = [0; Self::ENCODED_LEN];
12299        let mut buf = if avail_len < Self::ENCODED_LEN {
12300            payload_buf[0..avail_len].copy_from_slice(__input);
12301            Bytes::new(&payload_buf)
12302        } else {
12303            Bytes::new(__input)
12304        };
12305        let mut __struct = Self::default();
12306        __struct.arming_time_utc = buf.get_u64_le();
12307        __struct.takeoff_time_utc = buf.get_u64_le();
12308        __struct.flight_uuid = buf.get_u64_le();
12309        __struct.time_boot_ms = buf.get_u32_le();
12310        __struct.landing_time = buf.get_u32_le();
12311        Ok(__struct)
12312    }
12313    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12314        let mut __tmp = BytesMut::new(bytes);
12315        #[allow(clippy::absurd_extreme_comparisons)]
12316        #[allow(unused_comparisons)]
12317        if __tmp.remaining() < Self::ENCODED_LEN {
12318            panic!(
12319                "buffer is too small (need {} bytes, but got {})",
12320                Self::ENCODED_LEN,
12321                __tmp.remaining(),
12322            )
12323        }
12324        __tmp.put_u64_le(self.arming_time_utc);
12325        __tmp.put_u64_le(self.takeoff_time_utc);
12326        __tmp.put_u64_le(self.flight_uuid);
12327        __tmp.put_u32_le(self.time_boot_ms);
12328        if matches!(version, MavlinkVersion::V2) {
12329            __tmp.put_u32_le(self.landing_time);
12330            let len = __tmp.len();
12331            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12332        } else {
12333            __tmp.len()
12334        }
12335    }
12336}
12337#[doc = "Current motion information from a designated system."]
12338#[doc = ""]
12339#[doc = "ID: 144"]
12340#[derive(Debug, Clone, PartialEq)]
12341#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12342#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12343pub struct FOLLOW_TARGET_DATA {
12344    #[doc = "Timestamp (time since system boot)."]
12345    pub timestamp: u64,
12346    #[doc = "button states or switches of a tracker device"]
12347    pub custom_state: u64,
12348    #[doc = "Latitude (WGS84)"]
12349    pub lat: i32,
12350    #[doc = "Longitude (WGS84)"]
12351    pub lon: i32,
12352    #[doc = "Altitude (MSL)"]
12353    pub alt: f32,
12354    #[doc = "target velocity (0,0,0) for unknown"]
12355    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12356    pub vel: [f32; 3],
12357    #[doc = "linear target acceleration (0,0,0) for unknown"]
12358    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12359    pub acc: [f32; 3],
12360    #[doc = "(0 0 0 0 for unknown)"]
12361    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12362    pub attitude_q: [f32; 4],
12363    #[doc = "(0 0 0 for unknown)"]
12364    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12365    pub rates: [f32; 3],
12366    #[doc = "eph epv"]
12367    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12368    pub position_cov: [f32; 3],
12369    #[doc = "bit positions for tracker reporting capabilities (POS = 0, VEL = 1, ACCEL = 2, ATT + RATES = 3)"]
12370    pub est_capabilities: u8,
12371}
12372impl FOLLOW_TARGET_DATA {
12373    pub const ENCODED_LEN: usize = 93usize;
12374    pub const DEFAULT: Self = Self {
12375        timestamp: 0_u64,
12376        custom_state: 0_u64,
12377        lat: 0_i32,
12378        lon: 0_i32,
12379        alt: 0.0_f32,
12380        vel: [0.0_f32; 3usize],
12381        acc: [0.0_f32; 3usize],
12382        attitude_q: [0.0_f32; 4usize],
12383        rates: [0.0_f32; 3usize],
12384        position_cov: [0.0_f32; 3usize],
12385        est_capabilities: 0_u8,
12386    };
12387    #[cfg(feature = "arbitrary")]
12388    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12389        use arbitrary::{Arbitrary, Unstructured};
12390        let mut buf = [0u8; 1024];
12391        rng.fill_bytes(&mut buf);
12392        let mut unstructured = Unstructured::new(&buf);
12393        Self::arbitrary(&mut unstructured).unwrap_or_default()
12394    }
12395}
12396impl Default for FOLLOW_TARGET_DATA {
12397    fn default() -> Self {
12398        Self::DEFAULT.clone()
12399    }
12400}
12401impl MessageData for FOLLOW_TARGET_DATA {
12402    type Message = MavMessage;
12403    const ID: u32 = 144u32;
12404    const NAME: &'static str = "FOLLOW_TARGET";
12405    const EXTRA_CRC: u8 = 127u8;
12406    const ENCODED_LEN: usize = 93usize;
12407    fn deser(
12408        _version: MavlinkVersion,
12409        __input: &[u8],
12410    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12411        let avail_len = __input.len();
12412        let mut payload_buf = [0; Self::ENCODED_LEN];
12413        let mut buf = if avail_len < Self::ENCODED_LEN {
12414            payload_buf[0..avail_len].copy_from_slice(__input);
12415            Bytes::new(&payload_buf)
12416        } else {
12417            Bytes::new(__input)
12418        };
12419        let mut __struct = Self::default();
12420        __struct.timestamp = buf.get_u64_le();
12421        __struct.custom_state = buf.get_u64_le();
12422        __struct.lat = buf.get_i32_le();
12423        __struct.lon = buf.get_i32_le();
12424        __struct.alt = buf.get_f32_le();
12425        for v in &mut __struct.vel {
12426            let val = buf.get_f32_le();
12427            *v = val;
12428        }
12429        for v in &mut __struct.acc {
12430            let val = buf.get_f32_le();
12431            *v = val;
12432        }
12433        for v in &mut __struct.attitude_q {
12434            let val = buf.get_f32_le();
12435            *v = val;
12436        }
12437        for v in &mut __struct.rates {
12438            let val = buf.get_f32_le();
12439            *v = val;
12440        }
12441        for v in &mut __struct.position_cov {
12442            let val = buf.get_f32_le();
12443            *v = val;
12444        }
12445        __struct.est_capabilities = buf.get_u8();
12446        Ok(__struct)
12447    }
12448    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12449        let mut __tmp = BytesMut::new(bytes);
12450        #[allow(clippy::absurd_extreme_comparisons)]
12451        #[allow(unused_comparisons)]
12452        if __tmp.remaining() < Self::ENCODED_LEN {
12453            panic!(
12454                "buffer is too small (need {} bytes, but got {})",
12455                Self::ENCODED_LEN,
12456                __tmp.remaining(),
12457            )
12458        }
12459        __tmp.put_u64_le(self.timestamp);
12460        __tmp.put_u64_le(self.custom_state);
12461        __tmp.put_i32_le(self.lat);
12462        __tmp.put_i32_le(self.lon);
12463        __tmp.put_f32_le(self.alt);
12464        for val in &self.vel {
12465            __tmp.put_f32_le(*val);
12466        }
12467        for val in &self.acc {
12468            __tmp.put_f32_le(*val);
12469        }
12470        for val in &self.attitude_q {
12471            __tmp.put_f32_le(*val);
12472        }
12473        for val in &self.rates {
12474            __tmp.put_f32_le(*val);
12475        }
12476        for val in &self.position_cov {
12477            __tmp.put_f32_le(*val);
12478        }
12479        __tmp.put_u8(self.est_capabilities);
12480        if matches!(version, MavlinkVersion::V2) {
12481            let len = __tmp.len();
12482            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12483        } else {
12484            __tmp.len()
12485        }
12486    }
12487}
12488#[doc = "Fuel status.         This message provides \"generic\" fuel level information for  in a GCS and for triggering failsafes in an autopilot.         The fuel type and associated units for fields in this message are defined in the enum MAV_FUEL_TYPE.          The reported `consumed_fuel` and `remaining_fuel` must only be supplied if measured: they must not be inferred from the `maximum_fuel` and the other value.         A recipient can assume that if these fields are supplied they are accurate.         If not provided, the recipient can infer `remaining_fuel` from `maximum_fuel` and `consumed_fuel` on the assumption that the fuel was initially at its maximum (this is what battery monitors assume).         Note however that this is an assumption, and the UI should prompt the user appropriately (i.e. notify user that they should fill the tank before boot).          This kind of information may also be sent in fuel-specific messages such as BATTERY_STATUS_V2.         If both messages are sent for the same fuel system, the ids and corresponding information must match.          This should be streamed (nominally at 0.1 Hz)."]
12489#[doc = ""]
12490#[doc = "ID: 371"]
12491#[derive(Debug, Clone, PartialEq)]
12492#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12493#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12494pub struct FUEL_STATUS_DATA {
12495    #[doc = "Capacity when full. Must be provided."]
12496    pub maximum_fuel: f32,
12497    #[doc = "Consumed fuel (measured). This value should not be inferred: if not measured set to NaN. NaN: field not provided."]
12498    pub consumed_fuel: f32,
12499    #[doc = "Remaining fuel until empty (measured). The value should not be inferred: if not measured set to NaN. NaN: field not provided."]
12500    pub remaining_fuel: f32,
12501    #[doc = "Positive value when emptying/using, and negative if filling/replacing. NaN: field not provided."]
12502    pub flow_rate: f32,
12503    #[doc = "Fuel temperature. NaN: field not provided."]
12504    pub temperature: f32,
12505    #[doc = "Fuel type. Defines units for fuel capacity and consumption fields above."]
12506    pub fuel_type: MavFuelType,
12507    #[doc = "Fuel ID. Must match ID of other messages for same fuel system, such as BATTERY_STATUS_V2."]
12508    pub id: u8,
12509    #[doc = "Percentage of remaining fuel, relative to full. Values: [0-100], UINT8_MAX: field not provided."]
12510    pub percent_remaining: u8,
12511}
12512impl FUEL_STATUS_DATA {
12513    pub const ENCODED_LEN: usize = 26usize;
12514    pub const DEFAULT: Self = Self {
12515        maximum_fuel: 0.0_f32,
12516        consumed_fuel: 0.0_f32,
12517        remaining_fuel: 0.0_f32,
12518        flow_rate: 0.0_f32,
12519        temperature: 0.0_f32,
12520        fuel_type: MavFuelType::DEFAULT,
12521        id: 0_u8,
12522        percent_remaining: 0_u8,
12523    };
12524    #[cfg(feature = "arbitrary")]
12525    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12526        use arbitrary::{Arbitrary, Unstructured};
12527        let mut buf = [0u8; 1024];
12528        rng.fill_bytes(&mut buf);
12529        let mut unstructured = Unstructured::new(&buf);
12530        Self::arbitrary(&mut unstructured).unwrap_or_default()
12531    }
12532}
12533impl Default for FUEL_STATUS_DATA {
12534    fn default() -> Self {
12535        Self::DEFAULT.clone()
12536    }
12537}
12538impl MessageData for FUEL_STATUS_DATA {
12539    type Message = MavMessage;
12540    const ID: u32 = 371u32;
12541    const NAME: &'static str = "FUEL_STATUS";
12542    const EXTRA_CRC: u8 = 10u8;
12543    const ENCODED_LEN: usize = 26usize;
12544    fn deser(
12545        _version: MavlinkVersion,
12546        __input: &[u8],
12547    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12548        let avail_len = __input.len();
12549        let mut payload_buf = [0; Self::ENCODED_LEN];
12550        let mut buf = if avail_len < Self::ENCODED_LEN {
12551            payload_buf[0..avail_len].copy_from_slice(__input);
12552            Bytes::new(&payload_buf)
12553        } else {
12554            Bytes::new(__input)
12555        };
12556        let mut __struct = Self::default();
12557        __struct.maximum_fuel = buf.get_f32_le();
12558        __struct.consumed_fuel = buf.get_f32_le();
12559        __struct.remaining_fuel = buf.get_f32_le();
12560        __struct.flow_rate = buf.get_f32_le();
12561        __struct.temperature = buf.get_f32_le();
12562        let tmp = buf.get_u32_le();
12563        __struct.fuel_type = FromPrimitive::from_u32(tmp).ok_or(
12564            ::mavlink_core::error::ParserError::InvalidEnum {
12565                enum_type: "MavFuelType",
12566                value: tmp as u32,
12567            },
12568        )?;
12569        __struct.id = buf.get_u8();
12570        __struct.percent_remaining = buf.get_u8();
12571        Ok(__struct)
12572    }
12573    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12574        let mut __tmp = BytesMut::new(bytes);
12575        #[allow(clippy::absurd_extreme_comparisons)]
12576        #[allow(unused_comparisons)]
12577        if __tmp.remaining() < Self::ENCODED_LEN {
12578            panic!(
12579                "buffer is too small (need {} bytes, but got {})",
12580                Self::ENCODED_LEN,
12581                __tmp.remaining(),
12582            )
12583        }
12584        __tmp.put_f32_le(self.maximum_fuel);
12585        __tmp.put_f32_le(self.consumed_fuel);
12586        __tmp.put_f32_le(self.remaining_fuel);
12587        __tmp.put_f32_le(self.flow_rate);
12588        __tmp.put_f32_le(self.temperature);
12589        __tmp.put_u32_le(self.fuel_type as u32);
12590        __tmp.put_u8(self.id);
12591        __tmp.put_u8(self.percent_remaining);
12592        if matches!(version, MavlinkVersion::V2) {
12593            let len = __tmp.len();
12594            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12595        } else {
12596            __tmp.len()
12597        }
12598    }
12599}
12600#[doc = "Fixed-wing soaring (i.e. thermal seeking) data."]
12601#[doc = ""]
12602#[doc = "ID: 8011"]
12603#[derive(Debug, Clone, PartialEq)]
12604#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12605#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12606pub struct FW_SOARING_DATA_DATA {
12607    #[doc = "Timestamp"]
12608    pub timestamp: u64,
12609    #[doc = "Timestamp since last mode change"]
12610    pub timestampModeChanged: u64,
12611    #[doc = "Thermal core updraft strength"]
12612    pub xW: f32,
12613    #[doc = "Thermal radius"]
12614    pub xR: f32,
12615    #[doc = "Thermal center latitude"]
12616    pub xLat: f32,
12617    #[doc = "Thermal center longitude"]
12618    pub xLon: f32,
12619    #[doc = "Variance W"]
12620    pub VarW: f32,
12621    #[doc = "Variance R"]
12622    pub VarR: f32,
12623    #[doc = "Variance Lat"]
12624    pub VarLat: f32,
12625    #[doc = "Variance Lon"]
12626    pub VarLon: f32,
12627    #[doc = "Suggested loiter radius"]
12628    pub LoiterRadius: f32,
12629    #[doc = "Suggested loiter direction"]
12630    pub LoiterDirection: f32,
12631    #[doc = "Distance to soar point"]
12632    pub DistToSoarPoint: f32,
12633    #[doc = "Expected sink rate at current airspeed, roll and throttle"]
12634    pub vSinkExp: f32,
12635    #[doc = "Measurement / updraft speed at current/local airplane position"]
12636    pub z1_LocalUpdraftSpeed: f32,
12637    #[doc = "Measurement / roll angle tracking error"]
12638    pub z2_DeltaRoll: f32,
12639    #[doc = "Expected measurement 1"]
12640    pub z1_exp: f32,
12641    #[doc = "Expected measurement 2"]
12642    pub z2_exp: f32,
12643    #[doc = "Thermal drift (from estimator prediction step only)"]
12644    pub ThermalGSNorth: f32,
12645    #[doc = "Thermal drift (from estimator prediction step only)"]
12646    pub ThermalGSEast: f32,
12647    #[doc = "Total specific energy change (filtered)"]
12648    pub TSE_dot: f32,
12649    #[doc = "Debug variable 1"]
12650    pub DebugVar1: f32,
12651    #[doc = "Debug variable 2"]
12652    pub DebugVar2: f32,
12653    #[doc = "Control Mode [-]"]
12654    pub ControlMode: u8,
12655    #[doc = "Data valid [-]"]
12656    pub valid: u8,
12657}
12658impl FW_SOARING_DATA_DATA {
12659    pub const ENCODED_LEN: usize = 102usize;
12660    pub const DEFAULT: Self = Self {
12661        timestamp: 0_u64,
12662        timestampModeChanged: 0_u64,
12663        xW: 0.0_f32,
12664        xR: 0.0_f32,
12665        xLat: 0.0_f32,
12666        xLon: 0.0_f32,
12667        VarW: 0.0_f32,
12668        VarR: 0.0_f32,
12669        VarLat: 0.0_f32,
12670        VarLon: 0.0_f32,
12671        LoiterRadius: 0.0_f32,
12672        LoiterDirection: 0.0_f32,
12673        DistToSoarPoint: 0.0_f32,
12674        vSinkExp: 0.0_f32,
12675        z1_LocalUpdraftSpeed: 0.0_f32,
12676        z2_DeltaRoll: 0.0_f32,
12677        z1_exp: 0.0_f32,
12678        z2_exp: 0.0_f32,
12679        ThermalGSNorth: 0.0_f32,
12680        ThermalGSEast: 0.0_f32,
12681        TSE_dot: 0.0_f32,
12682        DebugVar1: 0.0_f32,
12683        DebugVar2: 0.0_f32,
12684        ControlMode: 0_u8,
12685        valid: 0_u8,
12686    };
12687    #[cfg(feature = "arbitrary")]
12688    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12689        use arbitrary::{Arbitrary, Unstructured};
12690        let mut buf = [0u8; 1024];
12691        rng.fill_bytes(&mut buf);
12692        let mut unstructured = Unstructured::new(&buf);
12693        Self::arbitrary(&mut unstructured).unwrap_or_default()
12694    }
12695}
12696impl Default for FW_SOARING_DATA_DATA {
12697    fn default() -> Self {
12698        Self::DEFAULT.clone()
12699    }
12700}
12701impl MessageData for FW_SOARING_DATA_DATA {
12702    type Message = MavMessage;
12703    const ID: u32 = 8011u32;
12704    const NAME: &'static str = "FW_SOARING_DATA";
12705    const EXTRA_CRC: u8 = 20u8;
12706    const ENCODED_LEN: usize = 102usize;
12707    fn deser(
12708        _version: MavlinkVersion,
12709        __input: &[u8],
12710    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12711        let avail_len = __input.len();
12712        let mut payload_buf = [0; Self::ENCODED_LEN];
12713        let mut buf = if avail_len < Self::ENCODED_LEN {
12714            payload_buf[0..avail_len].copy_from_slice(__input);
12715            Bytes::new(&payload_buf)
12716        } else {
12717            Bytes::new(__input)
12718        };
12719        let mut __struct = Self::default();
12720        __struct.timestamp = buf.get_u64_le();
12721        __struct.timestampModeChanged = buf.get_u64_le();
12722        __struct.xW = buf.get_f32_le();
12723        __struct.xR = buf.get_f32_le();
12724        __struct.xLat = buf.get_f32_le();
12725        __struct.xLon = buf.get_f32_le();
12726        __struct.VarW = buf.get_f32_le();
12727        __struct.VarR = buf.get_f32_le();
12728        __struct.VarLat = buf.get_f32_le();
12729        __struct.VarLon = buf.get_f32_le();
12730        __struct.LoiterRadius = buf.get_f32_le();
12731        __struct.LoiterDirection = buf.get_f32_le();
12732        __struct.DistToSoarPoint = buf.get_f32_le();
12733        __struct.vSinkExp = buf.get_f32_le();
12734        __struct.z1_LocalUpdraftSpeed = buf.get_f32_le();
12735        __struct.z2_DeltaRoll = buf.get_f32_le();
12736        __struct.z1_exp = buf.get_f32_le();
12737        __struct.z2_exp = buf.get_f32_le();
12738        __struct.ThermalGSNorth = buf.get_f32_le();
12739        __struct.ThermalGSEast = buf.get_f32_le();
12740        __struct.TSE_dot = buf.get_f32_le();
12741        __struct.DebugVar1 = buf.get_f32_le();
12742        __struct.DebugVar2 = buf.get_f32_le();
12743        __struct.ControlMode = buf.get_u8();
12744        __struct.valid = buf.get_u8();
12745        Ok(__struct)
12746    }
12747    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12748        let mut __tmp = BytesMut::new(bytes);
12749        #[allow(clippy::absurd_extreme_comparisons)]
12750        #[allow(unused_comparisons)]
12751        if __tmp.remaining() < Self::ENCODED_LEN {
12752            panic!(
12753                "buffer is too small (need {} bytes, but got {})",
12754                Self::ENCODED_LEN,
12755                __tmp.remaining(),
12756            )
12757        }
12758        __tmp.put_u64_le(self.timestamp);
12759        __tmp.put_u64_le(self.timestampModeChanged);
12760        __tmp.put_f32_le(self.xW);
12761        __tmp.put_f32_le(self.xR);
12762        __tmp.put_f32_le(self.xLat);
12763        __tmp.put_f32_le(self.xLon);
12764        __tmp.put_f32_le(self.VarW);
12765        __tmp.put_f32_le(self.VarR);
12766        __tmp.put_f32_le(self.VarLat);
12767        __tmp.put_f32_le(self.VarLon);
12768        __tmp.put_f32_le(self.LoiterRadius);
12769        __tmp.put_f32_le(self.LoiterDirection);
12770        __tmp.put_f32_le(self.DistToSoarPoint);
12771        __tmp.put_f32_le(self.vSinkExp);
12772        __tmp.put_f32_le(self.z1_LocalUpdraftSpeed);
12773        __tmp.put_f32_le(self.z2_DeltaRoll);
12774        __tmp.put_f32_le(self.z1_exp);
12775        __tmp.put_f32_le(self.z2_exp);
12776        __tmp.put_f32_le(self.ThermalGSNorth);
12777        __tmp.put_f32_le(self.ThermalGSEast);
12778        __tmp.put_f32_le(self.TSE_dot);
12779        __tmp.put_f32_le(self.DebugVar1);
12780        __tmp.put_f32_le(self.DebugVar2);
12781        __tmp.put_u8(self.ControlMode);
12782        __tmp.put_u8(self.valid);
12783        if matches!(version, MavlinkVersion::V2) {
12784            let len = __tmp.len();
12785            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12786        } else {
12787            __tmp.len()
12788        }
12789    }
12790}
12791#[doc = "Telemetry of power generation system. Alternator or mechanical generator."]
12792#[doc = ""]
12793#[doc = "ID: 373"]
12794#[derive(Debug, Clone, PartialEq)]
12795#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12796#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12797pub struct GENERATOR_STATUS_DATA {
12798    #[doc = "Status flags."]
12799    pub status: MavGeneratorStatusFlag,
12800    #[doc = "Current into/out of battery. Positive for out. Negative for in. NaN: field not provided."]
12801    pub battery_current: f32,
12802    #[doc = "Current going to the UAV. If battery current not available this is the DC current from the generator. Positive for out. Negative for in. NaN: field not provided"]
12803    pub load_current: f32,
12804    #[doc = "The power being generated. NaN: field not provided"]
12805    pub power_generated: f32,
12806    #[doc = "Voltage of the bus seen at the generator, or battery bus if battery bus is controlled by generator and at a different voltage to main bus."]
12807    pub bus_voltage: f32,
12808    #[doc = "The target battery current. Positive for out. Negative for in. NaN: field not provided"]
12809    pub bat_current_setpoint: f32,
12810    #[doc = "Seconds this generator has run since it was rebooted. UINT32_MAX: field not provided."]
12811    pub runtime: u32,
12812    #[doc = "Seconds until this generator requires maintenance.  A negative value indicates maintenance is past-due. INT32_MAX: field not provided."]
12813    pub time_until_maintenance: i32,
12814    #[doc = "Speed of electrical generator or alternator. UINT16_MAX: field not provided."]
12815    pub generator_speed: u16,
12816    #[doc = "The temperature of the rectifier or power converter. INT16_MAX: field not provided."]
12817    pub rectifier_temperature: i16,
12818    #[doc = "The temperature of the mechanical motor, fuel cell core or generator. INT16_MAX: field not provided."]
12819    pub generator_temperature: i16,
12820}
12821impl GENERATOR_STATUS_DATA {
12822    pub const ENCODED_LEN: usize = 42usize;
12823    pub const DEFAULT: Self = Self {
12824        status: MavGeneratorStatusFlag::DEFAULT,
12825        battery_current: 0.0_f32,
12826        load_current: 0.0_f32,
12827        power_generated: 0.0_f32,
12828        bus_voltage: 0.0_f32,
12829        bat_current_setpoint: 0.0_f32,
12830        runtime: 0_u32,
12831        time_until_maintenance: 0_i32,
12832        generator_speed: 0_u16,
12833        rectifier_temperature: 0_i16,
12834        generator_temperature: 0_i16,
12835    };
12836    #[cfg(feature = "arbitrary")]
12837    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12838        use arbitrary::{Arbitrary, Unstructured};
12839        let mut buf = [0u8; 1024];
12840        rng.fill_bytes(&mut buf);
12841        let mut unstructured = Unstructured::new(&buf);
12842        Self::arbitrary(&mut unstructured).unwrap_or_default()
12843    }
12844}
12845impl Default for GENERATOR_STATUS_DATA {
12846    fn default() -> Self {
12847        Self::DEFAULT.clone()
12848    }
12849}
12850impl MessageData for GENERATOR_STATUS_DATA {
12851    type Message = MavMessage;
12852    const ID: u32 = 373u32;
12853    const NAME: &'static str = "GENERATOR_STATUS";
12854    const EXTRA_CRC: u8 = 117u8;
12855    const ENCODED_LEN: usize = 42usize;
12856    fn deser(
12857        _version: MavlinkVersion,
12858        __input: &[u8],
12859    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12860        let avail_len = __input.len();
12861        let mut payload_buf = [0; Self::ENCODED_LEN];
12862        let mut buf = if avail_len < Self::ENCODED_LEN {
12863            payload_buf[0..avail_len].copy_from_slice(__input);
12864            Bytes::new(&payload_buf)
12865        } else {
12866            Bytes::new(__input)
12867        };
12868        let mut __struct = Self::default();
12869        let tmp = buf.get_u64_le();
12870        __struct.status = MavGeneratorStatusFlag::from_bits(
12871            tmp & MavGeneratorStatusFlag::all().bits(),
12872        )
12873        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
12874            flag_type: "MavGeneratorStatusFlag",
12875            value: tmp as u32,
12876        })?;
12877        __struct.battery_current = buf.get_f32_le();
12878        __struct.load_current = buf.get_f32_le();
12879        __struct.power_generated = buf.get_f32_le();
12880        __struct.bus_voltage = buf.get_f32_le();
12881        __struct.bat_current_setpoint = buf.get_f32_le();
12882        __struct.runtime = buf.get_u32_le();
12883        __struct.time_until_maintenance = buf.get_i32_le();
12884        __struct.generator_speed = buf.get_u16_le();
12885        __struct.rectifier_temperature = buf.get_i16_le();
12886        __struct.generator_temperature = buf.get_i16_le();
12887        Ok(__struct)
12888    }
12889    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12890        let mut __tmp = BytesMut::new(bytes);
12891        #[allow(clippy::absurd_extreme_comparisons)]
12892        #[allow(unused_comparisons)]
12893        if __tmp.remaining() < Self::ENCODED_LEN {
12894            panic!(
12895                "buffer is too small (need {} bytes, but got {})",
12896                Self::ENCODED_LEN,
12897                __tmp.remaining(),
12898            )
12899        }
12900        __tmp.put_u64_le(self.status.bits());
12901        __tmp.put_f32_le(self.battery_current);
12902        __tmp.put_f32_le(self.load_current);
12903        __tmp.put_f32_le(self.power_generated);
12904        __tmp.put_f32_le(self.bus_voltage);
12905        __tmp.put_f32_le(self.bat_current_setpoint);
12906        __tmp.put_u32_le(self.runtime);
12907        __tmp.put_i32_le(self.time_until_maintenance);
12908        __tmp.put_u16_le(self.generator_speed);
12909        __tmp.put_i16_le(self.rectifier_temperature);
12910        __tmp.put_i16_le(self.generator_temperature);
12911        if matches!(version, MavlinkVersion::V2) {
12912            let len = __tmp.len();
12913            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12914        } else {
12915            __tmp.len()
12916        }
12917    }
12918}
12919#[doc = "Message reporting the status of a gimbal device. \t  This message should be broadcast by a gimbal device component at a low regular rate (e.g. 5 Hz). \t  For the angles encoded in the quaternion and the angular velocities holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME is set, then they are relative to the vehicle heading (vehicle frame). \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is set, then they are relative to absolute North (earth frame). \t  If neither of these flags are set, then (for backwards compatibility) it holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_LOCK is set, then they are relative to absolute North (earth frame), \t  else they are relative to the vehicle heading (vehicle frame). \t  Other conditions of the flags are not allowed. \t  The quaternion and angular velocities in the other frame can be calculated from delta_yaw and delta_yaw_velocity as \t  q_earth = q_delta_yaw * q_vehicle and w_earth = w_delta_yaw_velocity + w_vehicle (if not NaN). \t  If neither the GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME nor the GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME flag is set, \t  then (for backwards compatibility) the data in the delta_yaw and delta_yaw_velocity fields are to be ignored. \t  New implementations should always set either GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME or GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME, \t  and always should set delta_yaw and delta_yaw_velocity either to the proper value or NaN."]
12920#[doc = ""]
12921#[doc = "ID: 285"]
12922#[derive(Debug, Clone, PartialEq)]
12923#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12924#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12925pub struct GIMBAL_DEVICE_ATTITUDE_STATUS_DATA {
12926    #[doc = "Timestamp (time since system boot)."]
12927    pub time_boot_ms: u32,
12928    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation). The frame is described in the message description."]
12929    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12930    pub q: [f32; 4],
12931    #[doc = "X component of angular velocity (positive: rolling to the right). The frame is described in the message description. NaN if unknown."]
12932    pub angular_velocity_x: f32,
12933    #[doc = "Y component of angular velocity (positive: pitching up). The frame is described in the message description. NaN if unknown."]
12934    pub angular_velocity_y: f32,
12935    #[doc = "Z component of angular velocity (positive: yawing to the right). The frame is described in the message description. NaN if unknown."]
12936    pub angular_velocity_z: f32,
12937    #[doc = "Failure flags (0 for no failure)"]
12938    pub failure_flags: GimbalDeviceErrorFlags,
12939    #[doc = "Current gimbal flags set."]
12940    pub flags: GimbalDeviceFlags,
12941    #[doc = "System ID"]
12942    pub target_system: u8,
12943    #[doc = "Component ID"]
12944    pub target_component: u8,
12945    #[doc = "Yaw angle relating the quaternions in earth and body frames (see message description). NaN if unknown."]
12946    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
12947    pub delta_yaw: f32,
12948    #[doc = "Yaw angular velocity relating the angular velocities in earth and body frames (see message description). NaN if unknown."]
12949    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
12950    pub delta_yaw_velocity: f32,
12951    #[doc = "This field is to be used if the gimbal manager and the gimbal device are the same component and hence have the same component ID. This field is then set a number between 1-6. If the component ID is separate, this field is not required and must be set to 0."]
12952    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
12953    pub gimbal_device_id: u8,
12954}
12955impl GIMBAL_DEVICE_ATTITUDE_STATUS_DATA {
12956    pub const ENCODED_LEN: usize = 49usize;
12957    pub const DEFAULT: Self = Self {
12958        time_boot_ms: 0_u32,
12959        q: [0.0_f32; 4usize],
12960        angular_velocity_x: 0.0_f32,
12961        angular_velocity_y: 0.0_f32,
12962        angular_velocity_z: 0.0_f32,
12963        failure_flags: GimbalDeviceErrorFlags::DEFAULT,
12964        flags: GimbalDeviceFlags::DEFAULT,
12965        target_system: 0_u8,
12966        target_component: 0_u8,
12967        delta_yaw: 0.0_f32,
12968        delta_yaw_velocity: 0.0_f32,
12969        gimbal_device_id: 0_u8,
12970    };
12971    #[cfg(feature = "arbitrary")]
12972    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12973        use arbitrary::{Arbitrary, Unstructured};
12974        let mut buf = [0u8; 1024];
12975        rng.fill_bytes(&mut buf);
12976        let mut unstructured = Unstructured::new(&buf);
12977        Self::arbitrary(&mut unstructured).unwrap_or_default()
12978    }
12979}
12980impl Default for GIMBAL_DEVICE_ATTITUDE_STATUS_DATA {
12981    fn default() -> Self {
12982        Self::DEFAULT.clone()
12983    }
12984}
12985impl MessageData for GIMBAL_DEVICE_ATTITUDE_STATUS_DATA {
12986    type Message = MavMessage;
12987    const ID: u32 = 285u32;
12988    const NAME: &'static str = "GIMBAL_DEVICE_ATTITUDE_STATUS";
12989    const EXTRA_CRC: u8 = 137u8;
12990    const ENCODED_LEN: usize = 49usize;
12991    fn deser(
12992        _version: MavlinkVersion,
12993        __input: &[u8],
12994    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12995        let avail_len = __input.len();
12996        let mut payload_buf = [0; Self::ENCODED_LEN];
12997        let mut buf = if avail_len < Self::ENCODED_LEN {
12998            payload_buf[0..avail_len].copy_from_slice(__input);
12999            Bytes::new(&payload_buf)
13000        } else {
13001            Bytes::new(__input)
13002        };
13003        let mut __struct = Self::default();
13004        __struct.time_boot_ms = buf.get_u32_le();
13005        for v in &mut __struct.q {
13006            let val = buf.get_f32_le();
13007            *v = val;
13008        }
13009        __struct.angular_velocity_x = buf.get_f32_le();
13010        __struct.angular_velocity_y = buf.get_f32_le();
13011        __struct.angular_velocity_z = buf.get_f32_le();
13012        let tmp = buf.get_u32_le();
13013        __struct.failure_flags = GimbalDeviceErrorFlags::from_bits(
13014            tmp & GimbalDeviceErrorFlags::all().bits(),
13015        )
13016        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
13017            flag_type: "GimbalDeviceErrorFlags",
13018            value: tmp as u32,
13019        })?;
13020        let tmp = buf.get_u16_le();
13021        __struct.flags = GimbalDeviceFlags::from_bits(tmp & GimbalDeviceFlags::all().bits())
13022            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
13023                flag_type: "GimbalDeviceFlags",
13024                value: tmp as u32,
13025            })?;
13026        __struct.target_system = buf.get_u8();
13027        __struct.target_component = buf.get_u8();
13028        __struct.delta_yaw = buf.get_f32_le();
13029        __struct.delta_yaw_velocity = buf.get_f32_le();
13030        __struct.gimbal_device_id = buf.get_u8();
13031        Ok(__struct)
13032    }
13033    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13034        let mut __tmp = BytesMut::new(bytes);
13035        #[allow(clippy::absurd_extreme_comparisons)]
13036        #[allow(unused_comparisons)]
13037        if __tmp.remaining() < Self::ENCODED_LEN {
13038            panic!(
13039                "buffer is too small (need {} bytes, but got {})",
13040                Self::ENCODED_LEN,
13041                __tmp.remaining(),
13042            )
13043        }
13044        __tmp.put_u32_le(self.time_boot_ms);
13045        for val in &self.q {
13046            __tmp.put_f32_le(*val);
13047        }
13048        __tmp.put_f32_le(self.angular_velocity_x);
13049        __tmp.put_f32_le(self.angular_velocity_y);
13050        __tmp.put_f32_le(self.angular_velocity_z);
13051        __tmp.put_u32_le(self.failure_flags.bits());
13052        __tmp.put_u16_le(self.flags.bits());
13053        __tmp.put_u8(self.target_system);
13054        __tmp.put_u8(self.target_component);
13055        if matches!(version, MavlinkVersion::V2) {
13056            __tmp.put_f32_le(self.delta_yaw);
13057            __tmp.put_f32_le(self.delta_yaw_velocity);
13058            __tmp.put_u8(self.gimbal_device_id);
13059            let len = __tmp.len();
13060            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13061        } else {
13062            __tmp.len()
13063        }
13064    }
13065}
13066#[doc = "Information about a low level gimbal. This message should be requested by the gimbal manager or a ground station using MAV_CMD_REQUEST_MESSAGE. The maximum angles and rates are the limits by hardware. However, the limits by software used are likely different/smaller and dependent on mode/settings/etc.."]
13067#[doc = ""]
13068#[doc = "ID: 283"]
13069#[derive(Debug, Clone, PartialEq)]
13070#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13071#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13072pub struct GIMBAL_DEVICE_INFORMATION_DATA {
13073    #[doc = "UID of gimbal hardware (0 if unknown)."]
13074    pub uid: u64,
13075    #[doc = "Timestamp (time since system boot)."]
13076    pub time_boot_ms: u32,
13077    #[doc = "0xff)."]
13078    pub firmware_version: u32,
13079    #[doc = "0xff)."]
13080    pub hardware_version: u32,
13081    #[doc = "Minimum hardware roll angle (positive: rolling to the right, negative: rolling to the left). NAN if unknown."]
13082    pub roll_min: f32,
13083    #[doc = "Maximum hardware roll angle (positive: rolling to the right, negative: rolling to the left). NAN if unknown."]
13084    pub roll_max: f32,
13085    #[doc = "Minimum hardware pitch angle (positive: up, negative: down). NAN if unknown."]
13086    pub pitch_min: f32,
13087    #[doc = "Maximum hardware pitch angle (positive: up, negative: down). NAN if unknown."]
13088    pub pitch_max: f32,
13089    #[doc = "Minimum hardware yaw angle (positive: to the right, negative: to the left). NAN if unknown."]
13090    pub yaw_min: f32,
13091    #[doc = "Maximum hardware yaw angle (positive: to the right, negative: to the left). NAN if unknown."]
13092    pub yaw_max: f32,
13093    #[doc = "Bitmap of gimbal capability flags."]
13094    pub cap_flags: GimbalDeviceCapFlags,
13095    #[doc = "Bitmap for use for gimbal-specific capability flags."]
13096    pub custom_cap_flags: u16,
13097    #[doc = "Name of the gimbal vendor."]
13098    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
13099    pub vendor_name: [u8; 32],
13100    #[doc = "Name of the gimbal model."]
13101    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
13102    pub model_name: [u8; 32],
13103    #[doc = "Custom name of the gimbal given to it by the user."]
13104    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
13105    pub custom_name: [u8; 32],
13106    #[doc = "This field is to be used if the gimbal manager and the gimbal device are the same component and hence have the same component ID. This field is then set to a number between 1-6. If the component ID is separate, this field is not required and must be set to 0."]
13107    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13108    pub gimbal_device_id: u8,
13109}
13110impl GIMBAL_DEVICE_INFORMATION_DATA {
13111    pub const ENCODED_LEN: usize = 145usize;
13112    pub const DEFAULT: Self = Self {
13113        uid: 0_u64,
13114        time_boot_ms: 0_u32,
13115        firmware_version: 0_u32,
13116        hardware_version: 0_u32,
13117        roll_min: 0.0_f32,
13118        roll_max: 0.0_f32,
13119        pitch_min: 0.0_f32,
13120        pitch_max: 0.0_f32,
13121        yaw_min: 0.0_f32,
13122        yaw_max: 0.0_f32,
13123        cap_flags: GimbalDeviceCapFlags::DEFAULT,
13124        custom_cap_flags: 0_u16,
13125        vendor_name: [0_u8; 32usize],
13126        model_name: [0_u8; 32usize],
13127        custom_name: [0_u8; 32usize],
13128        gimbal_device_id: 0_u8,
13129    };
13130    #[cfg(feature = "arbitrary")]
13131    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13132        use arbitrary::{Arbitrary, Unstructured};
13133        let mut buf = [0u8; 1024];
13134        rng.fill_bytes(&mut buf);
13135        let mut unstructured = Unstructured::new(&buf);
13136        Self::arbitrary(&mut unstructured).unwrap_or_default()
13137    }
13138}
13139impl Default for GIMBAL_DEVICE_INFORMATION_DATA {
13140    fn default() -> Self {
13141        Self::DEFAULT.clone()
13142    }
13143}
13144impl MessageData for GIMBAL_DEVICE_INFORMATION_DATA {
13145    type Message = MavMessage;
13146    const ID: u32 = 283u32;
13147    const NAME: &'static str = "GIMBAL_DEVICE_INFORMATION";
13148    const EXTRA_CRC: u8 = 74u8;
13149    const ENCODED_LEN: usize = 145usize;
13150    fn deser(
13151        _version: MavlinkVersion,
13152        __input: &[u8],
13153    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13154        let avail_len = __input.len();
13155        let mut payload_buf = [0; Self::ENCODED_LEN];
13156        let mut buf = if avail_len < Self::ENCODED_LEN {
13157            payload_buf[0..avail_len].copy_from_slice(__input);
13158            Bytes::new(&payload_buf)
13159        } else {
13160            Bytes::new(__input)
13161        };
13162        let mut __struct = Self::default();
13163        __struct.uid = buf.get_u64_le();
13164        __struct.time_boot_ms = buf.get_u32_le();
13165        __struct.firmware_version = buf.get_u32_le();
13166        __struct.hardware_version = buf.get_u32_le();
13167        __struct.roll_min = buf.get_f32_le();
13168        __struct.roll_max = buf.get_f32_le();
13169        __struct.pitch_min = buf.get_f32_le();
13170        __struct.pitch_max = buf.get_f32_le();
13171        __struct.yaw_min = buf.get_f32_le();
13172        __struct.yaw_max = buf.get_f32_le();
13173        let tmp = buf.get_u16_le();
13174        __struct.cap_flags = GimbalDeviceCapFlags::from_bits(
13175            tmp & GimbalDeviceCapFlags::all().bits(),
13176        )
13177        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
13178            flag_type: "GimbalDeviceCapFlags",
13179            value: tmp as u32,
13180        })?;
13181        __struct.custom_cap_flags = buf.get_u16_le();
13182        for v in &mut __struct.vendor_name {
13183            let val = buf.get_u8();
13184            *v = val;
13185        }
13186        for v in &mut __struct.model_name {
13187            let val = buf.get_u8();
13188            *v = val;
13189        }
13190        for v in &mut __struct.custom_name {
13191            let val = buf.get_u8();
13192            *v = val;
13193        }
13194        __struct.gimbal_device_id = buf.get_u8();
13195        Ok(__struct)
13196    }
13197    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13198        let mut __tmp = BytesMut::new(bytes);
13199        #[allow(clippy::absurd_extreme_comparisons)]
13200        #[allow(unused_comparisons)]
13201        if __tmp.remaining() < Self::ENCODED_LEN {
13202            panic!(
13203                "buffer is too small (need {} bytes, but got {})",
13204                Self::ENCODED_LEN,
13205                __tmp.remaining(),
13206            )
13207        }
13208        __tmp.put_u64_le(self.uid);
13209        __tmp.put_u32_le(self.time_boot_ms);
13210        __tmp.put_u32_le(self.firmware_version);
13211        __tmp.put_u32_le(self.hardware_version);
13212        __tmp.put_f32_le(self.roll_min);
13213        __tmp.put_f32_le(self.roll_max);
13214        __tmp.put_f32_le(self.pitch_min);
13215        __tmp.put_f32_le(self.pitch_max);
13216        __tmp.put_f32_le(self.yaw_min);
13217        __tmp.put_f32_le(self.yaw_max);
13218        __tmp.put_u16_le(self.cap_flags.bits());
13219        __tmp.put_u16_le(self.custom_cap_flags);
13220        for val in &self.vendor_name {
13221            __tmp.put_u8(*val);
13222        }
13223        for val in &self.model_name {
13224            __tmp.put_u8(*val);
13225        }
13226        for val in &self.custom_name {
13227            __tmp.put_u8(*val);
13228        }
13229        if matches!(version, MavlinkVersion::V2) {
13230            __tmp.put_u8(self.gimbal_device_id);
13231            let len = __tmp.len();
13232            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13233        } else {
13234            __tmp.len()
13235        }
13236    }
13237}
13238#[doc = "Low level message to control a gimbal device's attitude. \t  This message is to be sent from the gimbal manager to the gimbal device component. \t  The quaternion and angular velocities can be set to NaN according to use case. \t  For the angles encoded in the quaternion and the angular velocities holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME is set, then they are relative to the vehicle heading (vehicle frame). \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is set, then they are relative to absolute North (earth frame). \t  If neither of these flags are set, then (for backwards compatibility) it holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_LOCK is set, then they are relative to absolute North (earth frame), \t  else they are relative to the vehicle heading (vehicle frame). \t  Setting both GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME and GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is not allowed. \t  These rules are to ensure backwards compatibility. \t  New implementations should always set either GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME or GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME."]
13239#[doc = ""]
13240#[doc = "ID: 284"]
13241#[derive(Debug, Clone, PartialEq)]
13242#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13243#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13244pub struct GIMBAL_DEVICE_SET_ATTITUDE_DATA {
13245    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation). The frame is described in the message description. Set fields to NaN to be ignored."]
13246    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
13247    pub q: [f32; 4],
13248    #[doc = "X component of angular velocity (positive: rolling to the right). The frame is described in the message description. NaN to be ignored."]
13249    pub angular_velocity_x: f32,
13250    #[doc = "Y component of angular velocity (positive: pitching up). The frame is described in the message description. NaN to be ignored."]
13251    pub angular_velocity_y: f32,
13252    #[doc = "Z component of angular velocity (positive: yawing to the right). The frame is described in the message description. NaN to be ignored."]
13253    pub angular_velocity_z: f32,
13254    #[doc = "Low level gimbal flags."]
13255    pub flags: GimbalDeviceFlags,
13256    #[doc = "System ID"]
13257    pub target_system: u8,
13258    #[doc = "Component ID"]
13259    pub target_component: u8,
13260}
13261impl GIMBAL_DEVICE_SET_ATTITUDE_DATA {
13262    pub const ENCODED_LEN: usize = 32usize;
13263    pub const DEFAULT: Self = Self {
13264        q: [0.0_f32; 4usize],
13265        angular_velocity_x: 0.0_f32,
13266        angular_velocity_y: 0.0_f32,
13267        angular_velocity_z: 0.0_f32,
13268        flags: GimbalDeviceFlags::DEFAULT,
13269        target_system: 0_u8,
13270        target_component: 0_u8,
13271    };
13272    #[cfg(feature = "arbitrary")]
13273    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13274        use arbitrary::{Arbitrary, Unstructured};
13275        let mut buf = [0u8; 1024];
13276        rng.fill_bytes(&mut buf);
13277        let mut unstructured = Unstructured::new(&buf);
13278        Self::arbitrary(&mut unstructured).unwrap_or_default()
13279    }
13280}
13281impl Default for GIMBAL_DEVICE_SET_ATTITUDE_DATA {
13282    fn default() -> Self {
13283        Self::DEFAULT.clone()
13284    }
13285}
13286impl MessageData for GIMBAL_DEVICE_SET_ATTITUDE_DATA {
13287    type Message = MavMessage;
13288    const ID: u32 = 284u32;
13289    const NAME: &'static str = "GIMBAL_DEVICE_SET_ATTITUDE";
13290    const EXTRA_CRC: u8 = 99u8;
13291    const ENCODED_LEN: usize = 32usize;
13292    fn deser(
13293        _version: MavlinkVersion,
13294        __input: &[u8],
13295    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13296        let avail_len = __input.len();
13297        let mut payload_buf = [0; Self::ENCODED_LEN];
13298        let mut buf = if avail_len < Self::ENCODED_LEN {
13299            payload_buf[0..avail_len].copy_from_slice(__input);
13300            Bytes::new(&payload_buf)
13301        } else {
13302            Bytes::new(__input)
13303        };
13304        let mut __struct = Self::default();
13305        for v in &mut __struct.q {
13306            let val = buf.get_f32_le();
13307            *v = val;
13308        }
13309        __struct.angular_velocity_x = buf.get_f32_le();
13310        __struct.angular_velocity_y = buf.get_f32_le();
13311        __struct.angular_velocity_z = buf.get_f32_le();
13312        let tmp = buf.get_u16_le();
13313        __struct.flags = GimbalDeviceFlags::from_bits(tmp & GimbalDeviceFlags::all().bits())
13314            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
13315                flag_type: "GimbalDeviceFlags",
13316                value: tmp as u32,
13317            })?;
13318        __struct.target_system = buf.get_u8();
13319        __struct.target_component = buf.get_u8();
13320        Ok(__struct)
13321    }
13322    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13323        let mut __tmp = BytesMut::new(bytes);
13324        #[allow(clippy::absurd_extreme_comparisons)]
13325        #[allow(unused_comparisons)]
13326        if __tmp.remaining() < Self::ENCODED_LEN {
13327            panic!(
13328                "buffer is too small (need {} bytes, but got {})",
13329                Self::ENCODED_LEN,
13330                __tmp.remaining(),
13331            )
13332        }
13333        for val in &self.q {
13334            __tmp.put_f32_le(*val);
13335        }
13336        __tmp.put_f32_le(self.angular_velocity_x);
13337        __tmp.put_f32_le(self.angular_velocity_y);
13338        __tmp.put_f32_le(self.angular_velocity_z);
13339        __tmp.put_u16_le(self.flags.bits());
13340        __tmp.put_u8(self.target_system);
13341        __tmp.put_u8(self.target_component);
13342        if matches!(version, MavlinkVersion::V2) {
13343            let len = __tmp.len();
13344            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13345        } else {
13346            __tmp.len()
13347        }
13348    }
13349}
13350#[doc = "Information about a high level gimbal manager. This message should be requested by a ground station using MAV_CMD_REQUEST_MESSAGE."]
13351#[doc = ""]
13352#[doc = "ID: 280"]
13353#[derive(Debug, Clone, PartialEq)]
13354#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13355#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13356pub struct GIMBAL_MANAGER_INFORMATION_DATA {
13357    #[doc = "Timestamp (time since system boot)."]
13358    pub time_boot_ms: u32,
13359    #[doc = "Bitmap of gimbal capability flags."]
13360    pub cap_flags: GimbalManagerCapFlags,
13361    #[doc = "Minimum hardware roll angle (positive: rolling to the right, negative: rolling to the left)"]
13362    pub roll_min: f32,
13363    #[doc = "Maximum hardware roll angle (positive: rolling to the right, negative: rolling to the left)"]
13364    pub roll_max: f32,
13365    #[doc = "Minimum pitch angle (positive: up, negative: down)"]
13366    pub pitch_min: f32,
13367    #[doc = "Maximum pitch angle (positive: up, negative: down)"]
13368    pub pitch_max: f32,
13369    #[doc = "Minimum yaw angle (positive: to the right, negative: to the left)"]
13370    pub yaw_min: f32,
13371    #[doc = "Maximum yaw angle (positive: to the right, negative: to the left)"]
13372    pub yaw_max: f32,
13373    #[doc = "Gimbal device ID that this gimbal manager is responsible for. Component ID of gimbal device (or 1-6 for non-MAVLink gimbal)."]
13374    pub gimbal_device_id: u8,
13375}
13376impl GIMBAL_MANAGER_INFORMATION_DATA {
13377    pub const ENCODED_LEN: usize = 33usize;
13378    pub const DEFAULT: Self = Self {
13379        time_boot_ms: 0_u32,
13380        cap_flags: GimbalManagerCapFlags::DEFAULT,
13381        roll_min: 0.0_f32,
13382        roll_max: 0.0_f32,
13383        pitch_min: 0.0_f32,
13384        pitch_max: 0.0_f32,
13385        yaw_min: 0.0_f32,
13386        yaw_max: 0.0_f32,
13387        gimbal_device_id: 0_u8,
13388    };
13389    #[cfg(feature = "arbitrary")]
13390    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13391        use arbitrary::{Arbitrary, Unstructured};
13392        let mut buf = [0u8; 1024];
13393        rng.fill_bytes(&mut buf);
13394        let mut unstructured = Unstructured::new(&buf);
13395        Self::arbitrary(&mut unstructured).unwrap_or_default()
13396    }
13397}
13398impl Default for GIMBAL_MANAGER_INFORMATION_DATA {
13399    fn default() -> Self {
13400        Self::DEFAULT.clone()
13401    }
13402}
13403impl MessageData for GIMBAL_MANAGER_INFORMATION_DATA {
13404    type Message = MavMessage;
13405    const ID: u32 = 280u32;
13406    const NAME: &'static str = "GIMBAL_MANAGER_INFORMATION";
13407    const EXTRA_CRC: u8 = 70u8;
13408    const ENCODED_LEN: usize = 33usize;
13409    fn deser(
13410        _version: MavlinkVersion,
13411        __input: &[u8],
13412    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13413        let avail_len = __input.len();
13414        let mut payload_buf = [0; Self::ENCODED_LEN];
13415        let mut buf = if avail_len < Self::ENCODED_LEN {
13416            payload_buf[0..avail_len].copy_from_slice(__input);
13417            Bytes::new(&payload_buf)
13418        } else {
13419            Bytes::new(__input)
13420        };
13421        let mut __struct = Self::default();
13422        __struct.time_boot_ms = buf.get_u32_le();
13423        let tmp = buf.get_u32_le();
13424        __struct.cap_flags = GimbalManagerCapFlags::from_bits(
13425            tmp & GimbalManagerCapFlags::all().bits(),
13426        )
13427        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
13428            flag_type: "GimbalManagerCapFlags",
13429            value: tmp as u32,
13430        })?;
13431        __struct.roll_min = buf.get_f32_le();
13432        __struct.roll_max = buf.get_f32_le();
13433        __struct.pitch_min = buf.get_f32_le();
13434        __struct.pitch_max = buf.get_f32_le();
13435        __struct.yaw_min = buf.get_f32_le();
13436        __struct.yaw_max = buf.get_f32_le();
13437        __struct.gimbal_device_id = buf.get_u8();
13438        Ok(__struct)
13439    }
13440    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13441        let mut __tmp = BytesMut::new(bytes);
13442        #[allow(clippy::absurd_extreme_comparisons)]
13443        #[allow(unused_comparisons)]
13444        if __tmp.remaining() < Self::ENCODED_LEN {
13445            panic!(
13446                "buffer is too small (need {} bytes, but got {})",
13447                Self::ENCODED_LEN,
13448                __tmp.remaining(),
13449            )
13450        }
13451        __tmp.put_u32_le(self.time_boot_ms);
13452        __tmp.put_u32_le(self.cap_flags.bits());
13453        __tmp.put_f32_le(self.roll_min);
13454        __tmp.put_f32_le(self.roll_max);
13455        __tmp.put_f32_le(self.pitch_min);
13456        __tmp.put_f32_le(self.pitch_max);
13457        __tmp.put_f32_le(self.yaw_min);
13458        __tmp.put_f32_le(self.yaw_max);
13459        __tmp.put_u8(self.gimbal_device_id);
13460        if matches!(version, MavlinkVersion::V2) {
13461            let len = __tmp.len();
13462            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13463        } else {
13464            __tmp.len()
13465        }
13466    }
13467}
13468#[doc = "High level message to control a gimbal's attitude. This message is to be sent to the gimbal manager (e.g. from a ground station). Angles and rates can be set to NaN according to use case."]
13469#[doc = ""]
13470#[doc = "ID: 282"]
13471#[derive(Debug, Clone, PartialEq)]
13472#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13473#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13474pub struct GIMBAL_MANAGER_SET_ATTITUDE_DATA {
13475    #[doc = "High level gimbal manager flags to use."]
13476    pub flags: GimbalManagerFlags,
13477    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation, the frame is depends on whether the flag GIMBAL_MANAGER_FLAGS_YAW_LOCK is set)"]
13478    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
13479    pub q: [f32; 4],
13480    #[doc = "X component of angular velocity, positive is rolling to the right, NaN to be ignored."]
13481    pub angular_velocity_x: f32,
13482    #[doc = "Y component of angular velocity, positive is pitching up, NaN to be ignored."]
13483    pub angular_velocity_y: f32,
13484    #[doc = "Z component of angular velocity, positive is yawing to the right, NaN to be ignored."]
13485    pub angular_velocity_z: f32,
13486    #[doc = "System ID"]
13487    pub target_system: u8,
13488    #[doc = "Component ID"]
13489    pub target_component: u8,
13490    #[doc = "Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals)."]
13491    pub gimbal_device_id: u8,
13492}
13493impl GIMBAL_MANAGER_SET_ATTITUDE_DATA {
13494    pub const ENCODED_LEN: usize = 35usize;
13495    pub const DEFAULT: Self = Self {
13496        flags: GimbalManagerFlags::DEFAULT,
13497        q: [0.0_f32; 4usize],
13498        angular_velocity_x: 0.0_f32,
13499        angular_velocity_y: 0.0_f32,
13500        angular_velocity_z: 0.0_f32,
13501        target_system: 0_u8,
13502        target_component: 0_u8,
13503        gimbal_device_id: 0_u8,
13504    };
13505    #[cfg(feature = "arbitrary")]
13506    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13507        use arbitrary::{Arbitrary, Unstructured};
13508        let mut buf = [0u8; 1024];
13509        rng.fill_bytes(&mut buf);
13510        let mut unstructured = Unstructured::new(&buf);
13511        Self::arbitrary(&mut unstructured).unwrap_or_default()
13512    }
13513}
13514impl Default for GIMBAL_MANAGER_SET_ATTITUDE_DATA {
13515    fn default() -> Self {
13516        Self::DEFAULT.clone()
13517    }
13518}
13519impl MessageData for GIMBAL_MANAGER_SET_ATTITUDE_DATA {
13520    type Message = MavMessage;
13521    const ID: u32 = 282u32;
13522    const NAME: &'static str = "GIMBAL_MANAGER_SET_ATTITUDE";
13523    const EXTRA_CRC: u8 = 123u8;
13524    const ENCODED_LEN: usize = 35usize;
13525    fn deser(
13526        _version: MavlinkVersion,
13527        __input: &[u8],
13528    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13529        let avail_len = __input.len();
13530        let mut payload_buf = [0; Self::ENCODED_LEN];
13531        let mut buf = if avail_len < Self::ENCODED_LEN {
13532            payload_buf[0..avail_len].copy_from_slice(__input);
13533            Bytes::new(&payload_buf)
13534        } else {
13535            Bytes::new(__input)
13536        };
13537        let mut __struct = Self::default();
13538        let tmp = buf.get_u32_le();
13539        __struct.flags = GimbalManagerFlags::from_bits(tmp & GimbalManagerFlags::all().bits())
13540            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
13541                flag_type: "GimbalManagerFlags",
13542                value: tmp as u32,
13543            })?;
13544        for v in &mut __struct.q {
13545            let val = buf.get_f32_le();
13546            *v = val;
13547        }
13548        __struct.angular_velocity_x = buf.get_f32_le();
13549        __struct.angular_velocity_y = buf.get_f32_le();
13550        __struct.angular_velocity_z = buf.get_f32_le();
13551        __struct.target_system = buf.get_u8();
13552        __struct.target_component = buf.get_u8();
13553        __struct.gimbal_device_id = buf.get_u8();
13554        Ok(__struct)
13555    }
13556    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13557        let mut __tmp = BytesMut::new(bytes);
13558        #[allow(clippy::absurd_extreme_comparisons)]
13559        #[allow(unused_comparisons)]
13560        if __tmp.remaining() < Self::ENCODED_LEN {
13561            panic!(
13562                "buffer is too small (need {} bytes, but got {})",
13563                Self::ENCODED_LEN,
13564                __tmp.remaining(),
13565            )
13566        }
13567        __tmp.put_u32_le(self.flags.bits());
13568        for val in &self.q {
13569            __tmp.put_f32_le(*val);
13570        }
13571        __tmp.put_f32_le(self.angular_velocity_x);
13572        __tmp.put_f32_le(self.angular_velocity_y);
13573        __tmp.put_f32_le(self.angular_velocity_z);
13574        __tmp.put_u8(self.target_system);
13575        __tmp.put_u8(self.target_component);
13576        __tmp.put_u8(self.gimbal_device_id);
13577        if matches!(version, MavlinkVersion::V2) {
13578            let len = __tmp.len();
13579            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13580        } else {
13581            __tmp.len()
13582        }
13583    }
13584}
13585#[doc = "High level message to control a gimbal manually. The angles or angular rates are unitless; the actual rates will depend on internal gimbal manager settings/configuration (e.g. set by parameters). This message is to be sent to the gimbal manager (e.g. from a ground station). Angles and rates can be set to NaN according to use case."]
13586#[doc = ""]
13587#[doc = "ID: 288"]
13588#[derive(Debug, Clone, PartialEq)]
13589#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13590#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13591pub struct GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA {
13592    #[doc = "High level gimbal manager flags."]
13593    pub flags: GimbalManagerFlags,
13594    #[doc = "Pitch angle unitless (-1..1, positive: up, negative: down, NaN to be ignored)."]
13595    pub pitch: f32,
13596    #[doc = "Yaw angle unitless (-1..1, positive: to the right, negative: to the left, NaN to be ignored)."]
13597    pub yaw: f32,
13598    #[doc = "Pitch angular rate unitless (-1..1, positive: up, negative: down, NaN to be ignored)."]
13599    pub pitch_rate: f32,
13600    #[doc = "Yaw angular rate unitless (-1..1, positive: to the right, negative: to the left, NaN to be ignored)."]
13601    pub yaw_rate: f32,
13602    #[doc = "System ID"]
13603    pub target_system: u8,
13604    #[doc = "Component ID"]
13605    pub target_component: u8,
13606    #[doc = "Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals)."]
13607    pub gimbal_device_id: u8,
13608}
13609impl GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA {
13610    pub const ENCODED_LEN: usize = 23usize;
13611    pub const DEFAULT: Self = Self {
13612        flags: GimbalManagerFlags::DEFAULT,
13613        pitch: 0.0_f32,
13614        yaw: 0.0_f32,
13615        pitch_rate: 0.0_f32,
13616        yaw_rate: 0.0_f32,
13617        target_system: 0_u8,
13618        target_component: 0_u8,
13619        gimbal_device_id: 0_u8,
13620    };
13621    #[cfg(feature = "arbitrary")]
13622    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13623        use arbitrary::{Arbitrary, Unstructured};
13624        let mut buf = [0u8; 1024];
13625        rng.fill_bytes(&mut buf);
13626        let mut unstructured = Unstructured::new(&buf);
13627        Self::arbitrary(&mut unstructured).unwrap_or_default()
13628    }
13629}
13630impl Default for GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA {
13631    fn default() -> Self {
13632        Self::DEFAULT.clone()
13633    }
13634}
13635impl MessageData for GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA {
13636    type Message = MavMessage;
13637    const ID: u32 = 288u32;
13638    const NAME: &'static str = "GIMBAL_MANAGER_SET_MANUAL_CONTROL";
13639    const EXTRA_CRC: u8 = 20u8;
13640    const ENCODED_LEN: usize = 23usize;
13641    fn deser(
13642        _version: MavlinkVersion,
13643        __input: &[u8],
13644    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13645        let avail_len = __input.len();
13646        let mut payload_buf = [0; Self::ENCODED_LEN];
13647        let mut buf = if avail_len < Self::ENCODED_LEN {
13648            payload_buf[0..avail_len].copy_from_slice(__input);
13649            Bytes::new(&payload_buf)
13650        } else {
13651            Bytes::new(__input)
13652        };
13653        let mut __struct = Self::default();
13654        let tmp = buf.get_u32_le();
13655        __struct.flags = GimbalManagerFlags::from_bits(tmp & GimbalManagerFlags::all().bits())
13656            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
13657                flag_type: "GimbalManagerFlags",
13658                value: tmp as u32,
13659            })?;
13660        __struct.pitch = buf.get_f32_le();
13661        __struct.yaw = buf.get_f32_le();
13662        __struct.pitch_rate = buf.get_f32_le();
13663        __struct.yaw_rate = buf.get_f32_le();
13664        __struct.target_system = buf.get_u8();
13665        __struct.target_component = buf.get_u8();
13666        __struct.gimbal_device_id = buf.get_u8();
13667        Ok(__struct)
13668    }
13669    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13670        let mut __tmp = BytesMut::new(bytes);
13671        #[allow(clippy::absurd_extreme_comparisons)]
13672        #[allow(unused_comparisons)]
13673        if __tmp.remaining() < Self::ENCODED_LEN {
13674            panic!(
13675                "buffer is too small (need {} bytes, but got {})",
13676                Self::ENCODED_LEN,
13677                __tmp.remaining(),
13678            )
13679        }
13680        __tmp.put_u32_le(self.flags.bits());
13681        __tmp.put_f32_le(self.pitch);
13682        __tmp.put_f32_le(self.yaw);
13683        __tmp.put_f32_le(self.pitch_rate);
13684        __tmp.put_f32_le(self.yaw_rate);
13685        __tmp.put_u8(self.target_system);
13686        __tmp.put_u8(self.target_component);
13687        __tmp.put_u8(self.gimbal_device_id);
13688        if matches!(version, MavlinkVersion::V2) {
13689            let len = __tmp.len();
13690            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13691        } else {
13692            __tmp.len()
13693        }
13694    }
13695}
13696#[doc = "Set gimbal manager pitch and yaw angles (high rate message). This message is to be sent to the gimbal manager (e.g. from a ground station) and will be ignored by gimbal devices. Angles and rates can be set to NaN according to use case. Use MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW for low-rate adjustments that require confirmation."]
13697#[doc = ""]
13698#[doc = "ID: 287"]
13699#[derive(Debug, Clone, PartialEq)]
13700#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13701#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13702pub struct GIMBAL_MANAGER_SET_PITCHYAW_DATA {
13703    #[doc = "High level gimbal manager flags to use."]
13704    pub flags: GimbalManagerFlags,
13705    #[doc = "Pitch angle (positive: up, negative: down, NaN to be ignored)."]
13706    pub pitch: f32,
13707    #[doc = "Yaw angle (positive: to the right, negative: to the left, NaN to be ignored)."]
13708    pub yaw: f32,
13709    #[doc = "Pitch angular rate (positive: up, negative: down, NaN to be ignored)."]
13710    pub pitch_rate: f32,
13711    #[doc = "Yaw angular rate (positive: to the right, negative: to the left, NaN to be ignored)."]
13712    pub yaw_rate: f32,
13713    #[doc = "System ID"]
13714    pub target_system: u8,
13715    #[doc = "Component ID"]
13716    pub target_component: u8,
13717    #[doc = "Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals)."]
13718    pub gimbal_device_id: u8,
13719}
13720impl GIMBAL_MANAGER_SET_PITCHYAW_DATA {
13721    pub const ENCODED_LEN: usize = 23usize;
13722    pub const DEFAULT: Self = Self {
13723        flags: GimbalManagerFlags::DEFAULT,
13724        pitch: 0.0_f32,
13725        yaw: 0.0_f32,
13726        pitch_rate: 0.0_f32,
13727        yaw_rate: 0.0_f32,
13728        target_system: 0_u8,
13729        target_component: 0_u8,
13730        gimbal_device_id: 0_u8,
13731    };
13732    #[cfg(feature = "arbitrary")]
13733    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13734        use arbitrary::{Arbitrary, Unstructured};
13735        let mut buf = [0u8; 1024];
13736        rng.fill_bytes(&mut buf);
13737        let mut unstructured = Unstructured::new(&buf);
13738        Self::arbitrary(&mut unstructured).unwrap_or_default()
13739    }
13740}
13741impl Default for GIMBAL_MANAGER_SET_PITCHYAW_DATA {
13742    fn default() -> Self {
13743        Self::DEFAULT.clone()
13744    }
13745}
13746impl MessageData for GIMBAL_MANAGER_SET_PITCHYAW_DATA {
13747    type Message = MavMessage;
13748    const ID: u32 = 287u32;
13749    const NAME: &'static str = "GIMBAL_MANAGER_SET_PITCHYAW";
13750    const EXTRA_CRC: u8 = 1u8;
13751    const ENCODED_LEN: usize = 23usize;
13752    fn deser(
13753        _version: MavlinkVersion,
13754        __input: &[u8],
13755    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13756        let avail_len = __input.len();
13757        let mut payload_buf = [0; Self::ENCODED_LEN];
13758        let mut buf = if avail_len < Self::ENCODED_LEN {
13759            payload_buf[0..avail_len].copy_from_slice(__input);
13760            Bytes::new(&payload_buf)
13761        } else {
13762            Bytes::new(__input)
13763        };
13764        let mut __struct = Self::default();
13765        let tmp = buf.get_u32_le();
13766        __struct.flags = GimbalManagerFlags::from_bits(tmp & GimbalManagerFlags::all().bits())
13767            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
13768                flag_type: "GimbalManagerFlags",
13769                value: tmp as u32,
13770            })?;
13771        __struct.pitch = buf.get_f32_le();
13772        __struct.yaw = buf.get_f32_le();
13773        __struct.pitch_rate = buf.get_f32_le();
13774        __struct.yaw_rate = buf.get_f32_le();
13775        __struct.target_system = buf.get_u8();
13776        __struct.target_component = buf.get_u8();
13777        __struct.gimbal_device_id = buf.get_u8();
13778        Ok(__struct)
13779    }
13780    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13781        let mut __tmp = BytesMut::new(bytes);
13782        #[allow(clippy::absurd_extreme_comparisons)]
13783        #[allow(unused_comparisons)]
13784        if __tmp.remaining() < Self::ENCODED_LEN {
13785            panic!(
13786                "buffer is too small (need {} bytes, but got {})",
13787                Self::ENCODED_LEN,
13788                __tmp.remaining(),
13789            )
13790        }
13791        __tmp.put_u32_le(self.flags.bits());
13792        __tmp.put_f32_le(self.pitch);
13793        __tmp.put_f32_le(self.yaw);
13794        __tmp.put_f32_le(self.pitch_rate);
13795        __tmp.put_f32_le(self.yaw_rate);
13796        __tmp.put_u8(self.target_system);
13797        __tmp.put_u8(self.target_component);
13798        __tmp.put_u8(self.gimbal_device_id);
13799        if matches!(version, MavlinkVersion::V2) {
13800            let len = __tmp.len();
13801            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13802        } else {
13803            __tmp.len()
13804        }
13805    }
13806}
13807#[doc = "Current status about a high level gimbal manager. This message should be broadcast at a low regular rate (e.g. 5Hz)."]
13808#[doc = ""]
13809#[doc = "ID: 281"]
13810#[derive(Debug, Clone, PartialEq)]
13811#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13812#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13813pub struct GIMBAL_MANAGER_STATUS_DATA {
13814    #[doc = "Timestamp (time since system boot)."]
13815    pub time_boot_ms: u32,
13816    #[doc = "High level gimbal manager flags currently applied."]
13817    pub flags: GimbalManagerFlags,
13818    #[doc = "Gimbal device ID that this gimbal manager is responsible for. Component ID of gimbal device (or 1-6 for non-MAVLink gimbal)."]
13819    pub gimbal_device_id: u8,
13820    #[doc = "System ID of MAVLink component with primary control, 0 for none."]
13821    pub primary_control_sysid: u8,
13822    #[doc = "Component ID of MAVLink component with primary control, 0 for none."]
13823    pub primary_control_compid: u8,
13824    #[doc = "System ID of MAVLink component with secondary control, 0 for none."]
13825    pub secondary_control_sysid: u8,
13826    #[doc = "Component ID of MAVLink component with secondary control, 0 for none."]
13827    pub secondary_control_compid: u8,
13828}
13829impl GIMBAL_MANAGER_STATUS_DATA {
13830    pub const ENCODED_LEN: usize = 13usize;
13831    pub const DEFAULT: Self = Self {
13832        time_boot_ms: 0_u32,
13833        flags: GimbalManagerFlags::DEFAULT,
13834        gimbal_device_id: 0_u8,
13835        primary_control_sysid: 0_u8,
13836        primary_control_compid: 0_u8,
13837        secondary_control_sysid: 0_u8,
13838        secondary_control_compid: 0_u8,
13839    };
13840    #[cfg(feature = "arbitrary")]
13841    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13842        use arbitrary::{Arbitrary, Unstructured};
13843        let mut buf = [0u8; 1024];
13844        rng.fill_bytes(&mut buf);
13845        let mut unstructured = Unstructured::new(&buf);
13846        Self::arbitrary(&mut unstructured).unwrap_or_default()
13847    }
13848}
13849impl Default for GIMBAL_MANAGER_STATUS_DATA {
13850    fn default() -> Self {
13851        Self::DEFAULT.clone()
13852    }
13853}
13854impl MessageData for GIMBAL_MANAGER_STATUS_DATA {
13855    type Message = MavMessage;
13856    const ID: u32 = 281u32;
13857    const NAME: &'static str = "GIMBAL_MANAGER_STATUS";
13858    const EXTRA_CRC: u8 = 48u8;
13859    const ENCODED_LEN: usize = 13usize;
13860    fn deser(
13861        _version: MavlinkVersion,
13862        __input: &[u8],
13863    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13864        let avail_len = __input.len();
13865        let mut payload_buf = [0; Self::ENCODED_LEN];
13866        let mut buf = if avail_len < Self::ENCODED_LEN {
13867            payload_buf[0..avail_len].copy_from_slice(__input);
13868            Bytes::new(&payload_buf)
13869        } else {
13870            Bytes::new(__input)
13871        };
13872        let mut __struct = Self::default();
13873        __struct.time_boot_ms = buf.get_u32_le();
13874        let tmp = buf.get_u32_le();
13875        __struct.flags = GimbalManagerFlags::from_bits(tmp & GimbalManagerFlags::all().bits())
13876            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
13877                flag_type: "GimbalManagerFlags",
13878                value: tmp as u32,
13879            })?;
13880        __struct.gimbal_device_id = buf.get_u8();
13881        __struct.primary_control_sysid = buf.get_u8();
13882        __struct.primary_control_compid = buf.get_u8();
13883        __struct.secondary_control_sysid = buf.get_u8();
13884        __struct.secondary_control_compid = buf.get_u8();
13885        Ok(__struct)
13886    }
13887    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13888        let mut __tmp = BytesMut::new(bytes);
13889        #[allow(clippy::absurd_extreme_comparisons)]
13890        #[allow(unused_comparisons)]
13891        if __tmp.remaining() < Self::ENCODED_LEN {
13892            panic!(
13893                "buffer is too small (need {} bytes, but got {})",
13894                Self::ENCODED_LEN,
13895                __tmp.remaining(),
13896            )
13897        }
13898        __tmp.put_u32_le(self.time_boot_ms);
13899        __tmp.put_u32_le(self.flags.bits());
13900        __tmp.put_u8(self.gimbal_device_id);
13901        __tmp.put_u8(self.primary_control_sysid);
13902        __tmp.put_u8(self.primary_control_compid);
13903        __tmp.put_u8(self.secondary_control_sysid);
13904        __tmp.put_u8(self.secondary_control_compid);
13905        if matches!(version, MavlinkVersion::V2) {
13906            let len = __tmp.len();
13907            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13908        } else {
13909            __tmp.len()
13910        }
13911    }
13912}
13913#[doc = "The filtered global position (e.g. fused GPS and accelerometers). The position is in GPS-frame (right-handed, Z-up). It                is designed as scaled integer message since the resolution of float is not sufficient."]
13914#[doc = ""]
13915#[doc = "ID: 33"]
13916#[derive(Debug, Clone, PartialEq)]
13917#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13918#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13919pub struct GLOBAL_POSITION_INT_DATA {
13920    #[doc = "Timestamp (time since system boot)."]
13921    pub time_boot_ms: u32,
13922    #[doc = "Latitude, expressed"]
13923    pub lat: i32,
13924    #[doc = "Longitude, expressed"]
13925    pub lon: i32,
13926    #[doc = "Altitude (MSL). Note that virtually all GPS modules provide both WGS84 and MSL."]
13927    pub alt: i32,
13928    #[doc = "Altitude above home"]
13929    pub relative_alt: i32,
13930    #[doc = "Ground X Speed (Latitude, positive north)"]
13931    pub vx: i16,
13932    #[doc = "Ground Y Speed (Longitude, positive east)"]
13933    pub vy: i16,
13934    #[doc = "Ground Z Speed (Altitude, positive down)"]
13935    pub vz: i16,
13936    #[doc = "Vehicle heading (yaw angle), 0.0..359.99 degrees. If unknown, set to: UINT16_MAX"]
13937    pub hdg: u16,
13938}
13939impl GLOBAL_POSITION_INT_DATA {
13940    pub const ENCODED_LEN: usize = 28usize;
13941    pub const DEFAULT: Self = Self {
13942        time_boot_ms: 0_u32,
13943        lat: 0_i32,
13944        lon: 0_i32,
13945        alt: 0_i32,
13946        relative_alt: 0_i32,
13947        vx: 0_i16,
13948        vy: 0_i16,
13949        vz: 0_i16,
13950        hdg: 0_u16,
13951    };
13952    #[cfg(feature = "arbitrary")]
13953    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13954        use arbitrary::{Arbitrary, Unstructured};
13955        let mut buf = [0u8; 1024];
13956        rng.fill_bytes(&mut buf);
13957        let mut unstructured = Unstructured::new(&buf);
13958        Self::arbitrary(&mut unstructured).unwrap_or_default()
13959    }
13960}
13961impl Default for GLOBAL_POSITION_INT_DATA {
13962    fn default() -> Self {
13963        Self::DEFAULT.clone()
13964    }
13965}
13966impl MessageData for GLOBAL_POSITION_INT_DATA {
13967    type Message = MavMessage;
13968    const ID: u32 = 33u32;
13969    const NAME: &'static str = "GLOBAL_POSITION_INT";
13970    const EXTRA_CRC: u8 = 104u8;
13971    const ENCODED_LEN: usize = 28usize;
13972    fn deser(
13973        _version: MavlinkVersion,
13974        __input: &[u8],
13975    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13976        let avail_len = __input.len();
13977        let mut payload_buf = [0; Self::ENCODED_LEN];
13978        let mut buf = if avail_len < Self::ENCODED_LEN {
13979            payload_buf[0..avail_len].copy_from_slice(__input);
13980            Bytes::new(&payload_buf)
13981        } else {
13982            Bytes::new(__input)
13983        };
13984        let mut __struct = Self::default();
13985        __struct.time_boot_ms = buf.get_u32_le();
13986        __struct.lat = buf.get_i32_le();
13987        __struct.lon = buf.get_i32_le();
13988        __struct.alt = buf.get_i32_le();
13989        __struct.relative_alt = buf.get_i32_le();
13990        __struct.vx = buf.get_i16_le();
13991        __struct.vy = buf.get_i16_le();
13992        __struct.vz = buf.get_i16_le();
13993        __struct.hdg = buf.get_u16_le();
13994        Ok(__struct)
13995    }
13996    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13997        let mut __tmp = BytesMut::new(bytes);
13998        #[allow(clippy::absurd_extreme_comparisons)]
13999        #[allow(unused_comparisons)]
14000        if __tmp.remaining() < Self::ENCODED_LEN {
14001            panic!(
14002                "buffer is too small (need {} bytes, but got {})",
14003                Self::ENCODED_LEN,
14004                __tmp.remaining(),
14005            )
14006        }
14007        __tmp.put_u32_le(self.time_boot_ms);
14008        __tmp.put_i32_le(self.lat);
14009        __tmp.put_i32_le(self.lon);
14010        __tmp.put_i32_le(self.alt);
14011        __tmp.put_i32_le(self.relative_alt);
14012        __tmp.put_i16_le(self.vx);
14013        __tmp.put_i16_le(self.vy);
14014        __tmp.put_i16_le(self.vz);
14015        __tmp.put_u16_le(self.hdg);
14016        if matches!(version, MavlinkVersion::V2) {
14017            let len = __tmp.len();
14018            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14019        } else {
14020            __tmp.len()
14021        }
14022    }
14023}
14024#[doc = "The filtered global position (e.g. fused GPS and accelerometers). The position is in GPS-frame (right-handed, Z-up). It  is designed as scaled integer message since the resolution of float is not sufficient. NOTE: This message is intended for onboard networks / companion computers and higher-bandwidth links and optimized for accuracy and completeness. Please use the GLOBAL_POSITION_INT message for a minimal subset."]
14025#[doc = ""]
14026#[doc = "ID: 63"]
14027#[derive(Debug, Clone, PartialEq)]
14028#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14029#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14030pub struct GLOBAL_POSITION_INT_COV_DATA {
14031    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
14032    pub time_usec: u64,
14033    #[doc = "Latitude"]
14034    pub lat: i32,
14035    #[doc = "Longitude"]
14036    pub lon: i32,
14037    #[doc = "Altitude in meters above MSL"]
14038    pub alt: i32,
14039    #[doc = "Altitude above ground"]
14040    pub relative_alt: i32,
14041    #[doc = "Ground X Speed (Latitude)"]
14042    pub vx: f32,
14043    #[doc = "Ground Y Speed (Longitude)"]
14044    pub vy: f32,
14045    #[doc = "Ground Z Speed (Altitude)"]
14046    pub vz: f32,
14047    #[doc = "Row-major representation of a 6x6 position and velocity 6x6 cross-covariance matrix (states: lat, lon, alt, vx, vy, vz; first six entries are the first ROW, next six entries are the second row, etc.). If unknown, assign NaN value to first element in the array."]
14048    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14049    pub covariance: [f32; 36],
14050    #[doc = "Class id of the estimator this estimate originated from."]
14051    pub estimator_type: MavEstimatorType,
14052}
14053impl GLOBAL_POSITION_INT_COV_DATA {
14054    pub const ENCODED_LEN: usize = 181usize;
14055    pub const DEFAULT: Self = Self {
14056        time_usec: 0_u64,
14057        lat: 0_i32,
14058        lon: 0_i32,
14059        alt: 0_i32,
14060        relative_alt: 0_i32,
14061        vx: 0.0_f32,
14062        vy: 0.0_f32,
14063        vz: 0.0_f32,
14064        covariance: [0.0_f32; 36usize],
14065        estimator_type: MavEstimatorType::DEFAULT,
14066    };
14067    #[cfg(feature = "arbitrary")]
14068    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14069        use arbitrary::{Arbitrary, Unstructured};
14070        let mut buf = [0u8; 1024];
14071        rng.fill_bytes(&mut buf);
14072        let mut unstructured = Unstructured::new(&buf);
14073        Self::arbitrary(&mut unstructured).unwrap_or_default()
14074    }
14075}
14076impl Default for GLOBAL_POSITION_INT_COV_DATA {
14077    fn default() -> Self {
14078        Self::DEFAULT.clone()
14079    }
14080}
14081impl MessageData for GLOBAL_POSITION_INT_COV_DATA {
14082    type Message = MavMessage;
14083    const ID: u32 = 63u32;
14084    const NAME: &'static str = "GLOBAL_POSITION_INT_COV";
14085    const EXTRA_CRC: u8 = 119u8;
14086    const ENCODED_LEN: usize = 181usize;
14087    fn deser(
14088        _version: MavlinkVersion,
14089        __input: &[u8],
14090    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14091        let avail_len = __input.len();
14092        let mut payload_buf = [0; Self::ENCODED_LEN];
14093        let mut buf = if avail_len < Self::ENCODED_LEN {
14094            payload_buf[0..avail_len].copy_from_slice(__input);
14095            Bytes::new(&payload_buf)
14096        } else {
14097            Bytes::new(__input)
14098        };
14099        let mut __struct = Self::default();
14100        __struct.time_usec = buf.get_u64_le();
14101        __struct.lat = buf.get_i32_le();
14102        __struct.lon = buf.get_i32_le();
14103        __struct.alt = buf.get_i32_le();
14104        __struct.relative_alt = buf.get_i32_le();
14105        __struct.vx = buf.get_f32_le();
14106        __struct.vy = buf.get_f32_le();
14107        __struct.vz = buf.get_f32_le();
14108        for v in &mut __struct.covariance {
14109            let val = buf.get_f32_le();
14110            *v = val;
14111        }
14112        let tmp = buf.get_u8();
14113        __struct.estimator_type =
14114            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
14115                enum_type: "MavEstimatorType",
14116                value: tmp as u32,
14117            })?;
14118        Ok(__struct)
14119    }
14120    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14121        let mut __tmp = BytesMut::new(bytes);
14122        #[allow(clippy::absurd_extreme_comparisons)]
14123        #[allow(unused_comparisons)]
14124        if __tmp.remaining() < Self::ENCODED_LEN {
14125            panic!(
14126                "buffer is too small (need {} bytes, but got {})",
14127                Self::ENCODED_LEN,
14128                __tmp.remaining(),
14129            )
14130        }
14131        __tmp.put_u64_le(self.time_usec);
14132        __tmp.put_i32_le(self.lat);
14133        __tmp.put_i32_le(self.lon);
14134        __tmp.put_i32_le(self.alt);
14135        __tmp.put_i32_le(self.relative_alt);
14136        __tmp.put_f32_le(self.vx);
14137        __tmp.put_f32_le(self.vy);
14138        __tmp.put_f32_le(self.vz);
14139        for val in &self.covariance {
14140            __tmp.put_f32_le(*val);
14141        }
14142        __tmp.put_u8(self.estimator_type as u8);
14143        if matches!(version, MavlinkVersion::V2) {
14144            let len = __tmp.len();
14145            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14146        } else {
14147            __tmp.len()
14148        }
14149    }
14150}
14151#[doc = "Global position/attitude estimate from a vision source."]
14152#[doc = ""]
14153#[doc = "ID: 101"]
14154#[derive(Debug, Clone, PartialEq)]
14155#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14156#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14157pub struct GLOBAL_VISION_POSITION_ESTIMATE_DATA {
14158    #[doc = "Timestamp (UNIX time or since system boot)"]
14159    pub usec: u64,
14160    #[doc = "Global X position"]
14161    pub x: f32,
14162    #[doc = "Global Y position"]
14163    pub y: f32,
14164    #[doc = "Global Z position"]
14165    pub z: f32,
14166    #[doc = "Roll angle"]
14167    pub roll: f32,
14168    #[doc = "Pitch angle"]
14169    pub pitch: f32,
14170    #[doc = "Yaw angle"]
14171    pub yaw: f32,
14172    #[doc = "Row-major representation of pose 6x6 cross-covariance matrix upper right triangle (states: x_global, y_global, z_global, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
14173    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14174    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14175    pub covariance: [f32; 21],
14176    #[doc = "Estimate reset counter. This should be incremented when the estimate resets in any of the dimensions (position, velocity, attitude, angular speed). This is designed to be used when e.g an external SLAM system detects a loop-closure and the estimate jumps."]
14177    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14178    pub reset_counter: u8,
14179}
14180impl GLOBAL_VISION_POSITION_ESTIMATE_DATA {
14181    pub const ENCODED_LEN: usize = 117usize;
14182    pub const DEFAULT: Self = Self {
14183        usec: 0_u64,
14184        x: 0.0_f32,
14185        y: 0.0_f32,
14186        z: 0.0_f32,
14187        roll: 0.0_f32,
14188        pitch: 0.0_f32,
14189        yaw: 0.0_f32,
14190        covariance: [0.0_f32; 21usize],
14191        reset_counter: 0_u8,
14192    };
14193    #[cfg(feature = "arbitrary")]
14194    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14195        use arbitrary::{Arbitrary, Unstructured};
14196        let mut buf = [0u8; 1024];
14197        rng.fill_bytes(&mut buf);
14198        let mut unstructured = Unstructured::new(&buf);
14199        Self::arbitrary(&mut unstructured).unwrap_or_default()
14200    }
14201}
14202impl Default for GLOBAL_VISION_POSITION_ESTIMATE_DATA {
14203    fn default() -> Self {
14204        Self::DEFAULT.clone()
14205    }
14206}
14207impl MessageData for GLOBAL_VISION_POSITION_ESTIMATE_DATA {
14208    type Message = MavMessage;
14209    const ID: u32 = 101u32;
14210    const NAME: &'static str = "GLOBAL_VISION_POSITION_ESTIMATE";
14211    const EXTRA_CRC: u8 = 102u8;
14212    const ENCODED_LEN: usize = 117usize;
14213    fn deser(
14214        _version: MavlinkVersion,
14215        __input: &[u8],
14216    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14217        let avail_len = __input.len();
14218        let mut payload_buf = [0; Self::ENCODED_LEN];
14219        let mut buf = if avail_len < Self::ENCODED_LEN {
14220            payload_buf[0..avail_len].copy_from_slice(__input);
14221            Bytes::new(&payload_buf)
14222        } else {
14223            Bytes::new(__input)
14224        };
14225        let mut __struct = Self::default();
14226        __struct.usec = buf.get_u64_le();
14227        __struct.x = buf.get_f32_le();
14228        __struct.y = buf.get_f32_le();
14229        __struct.z = buf.get_f32_le();
14230        __struct.roll = buf.get_f32_le();
14231        __struct.pitch = buf.get_f32_le();
14232        __struct.yaw = buf.get_f32_le();
14233        for v in &mut __struct.covariance {
14234            let val = buf.get_f32_le();
14235            *v = val;
14236        }
14237        __struct.reset_counter = buf.get_u8();
14238        Ok(__struct)
14239    }
14240    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14241        let mut __tmp = BytesMut::new(bytes);
14242        #[allow(clippy::absurd_extreme_comparisons)]
14243        #[allow(unused_comparisons)]
14244        if __tmp.remaining() < Self::ENCODED_LEN {
14245            panic!(
14246                "buffer is too small (need {} bytes, but got {})",
14247                Self::ENCODED_LEN,
14248                __tmp.remaining(),
14249            )
14250        }
14251        __tmp.put_u64_le(self.usec);
14252        __tmp.put_f32_le(self.x);
14253        __tmp.put_f32_le(self.y);
14254        __tmp.put_f32_le(self.z);
14255        __tmp.put_f32_le(self.roll);
14256        __tmp.put_f32_le(self.pitch);
14257        __tmp.put_f32_le(self.yaw);
14258        if matches!(version, MavlinkVersion::V2) {
14259            for val in &self.covariance {
14260                __tmp.put_f32_le(*val);
14261            }
14262            __tmp.put_u8(self.reset_counter);
14263            let len = __tmp.len();
14264            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14265        } else {
14266            __tmp.len()
14267        }
14268    }
14269}
14270#[doc = "Second GPS data."]
14271#[doc = ""]
14272#[doc = "ID: 124"]
14273#[derive(Debug, Clone, PartialEq)]
14274#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14275#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14276pub struct GPS2_RAW_DATA {
14277    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
14278    pub time_usec: u64,
14279    #[doc = "Latitude (WGS84)"]
14280    pub lat: i32,
14281    #[doc = "Longitude (WGS84)"]
14282    pub lon: i32,
14283    #[doc = "Altitude (MSL). Positive for up."]
14284    pub alt: i32,
14285    #[doc = "Age of DGPS info"]
14286    pub dgps_age: u32,
14287    #[doc = "GPS HDOP horizontal dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
14288    pub eph: u16,
14289    #[doc = "GPS VDOP vertical dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
14290    pub epv: u16,
14291    #[doc = "GPS ground speed. If unknown, set to: UINT16_MAX"]
14292    pub vel: u16,
14293    #[doc = "Course over ground (NOT heading, but direction of movement): 0.0..359.99 degrees. If unknown, set to: UINT16_MAX"]
14294    pub cog: u16,
14295    #[doc = "GPS fix type."]
14296    pub fix_type: GpsFixType,
14297    #[doc = "Number of satellites visible. If unknown, set to UINT8_MAX"]
14298    pub satellites_visible: u8,
14299    #[doc = "Number of DGPS satellites"]
14300    pub dgps_numch: u8,
14301    #[doc = "Yaw in earth frame from north. Use 0 if this GPS does not provide yaw. Use UINT16_MAX if this GPS is configured to provide yaw and is currently unable to provide it. Use 36000 for north."]
14302    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14303    pub yaw: u16,
14304    #[doc = "Altitude (above WGS84, EGM96 ellipsoid). Positive for up."]
14305    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14306    pub alt_ellipsoid: i32,
14307    #[doc = "Position uncertainty."]
14308    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14309    pub h_acc: u32,
14310    #[doc = "Altitude uncertainty."]
14311    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14312    pub v_acc: u32,
14313    #[doc = "Speed uncertainty."]
14314    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14315    pub vel_acc: u32,
14316    #[doc = "Heading / track uncertainty"]
14317    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14318    pub hdg_acc: u32,
14319}
14320impl GPS2_RAW_DATA {
14321    pub const ENCODED_LEN: usize = 57usize;
14322    pub const DEFAULT: Self = Self {
14323        time_usec: 0_u64,
14324        lat: 0_i32,
14325        lon: 0_i32,
14326        alt: 0_i32,
14327        dgps_age: 0_u32,
14328        eph: 0_u16,
14329        epv: 0_u16,
14330        vel: 0_u16,
14331        cog: 0_u16,
14332        fix_type: GpsFixType::DEFAULT,
14333        satellites_visible: 0_u8,
14334        dgps_numch: 0_u8,
14335        yaw: 0_u16,
14336        alt_ellipsoid: 0_i32,
14337        h_acc: 0_u32,
14338        v_acc: 0_u32,
14339        vel_acc: 0_u32,
14340        hdg_acc: 0_u32,
14341    };
14342    #[cfg(feature = "arbitrary")]
14343    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14344        use arbitrary::{Arbitrary, Unstructured};
14345        let mut buf = [0u8; 1024];
14346        rng.fill_bytes(&mut buf);
14347        let mut unstructured = Unstructured::new(&buf);
14348        Self::arbitrary(&mut unstructured).unwrap_or_default()
14349    }
14350}
14351impl Default for GPS2_RAW_DATA {
14352    fn default() -> Self {
14353        Self::DEFAULT.clone()
14354    }
14355}
14356impl MessageData for GPS2_RAW_DATA {
14357    type Message = MavMessage;
14358    const ID: u32 = 124u32;
14359    const NAME: &'static str = "GPS2_RAW";
14360    const EXTRA_CRC: u8 = 87u8;
14361    const ENCODED_LEN: usize = 57usize;
14362    fn deser(
14363        _version: MavlinkVersion,
14364        __input: &[u8],
14365    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14366        let avail_len = __input.len();
14367        let mut payload_buf = [0; Self::ENCODED_LEN];
14368        let mut buf = if avail_len < Self::ENCODED_LEN {
14369            payload_buf[0..avail_len].copy_from_slice(__input);
14370            Bytes::new(&payload_buf)
14371        } else {
14372            Bytes::new(__input)
14373        };
14374        let mut __struct = Self::default();
14375        __struct.time_usec = buf.get_u64_le();
14376        __struct.lat = buf.get_i32_le();
14377        __struct.lon = buf.get_i32_le();
14378        __struct.alt = buf.get_i32_le();
14379        __struct.dgps_age = buf.get_u32_le();
14380        __struct.eph = buf.get_u16_le();
14381        __struct.epv = buf.get_u16_le();
14382        __struct.vel = buf.get_u16_le();
14383        __struct.cog = buf.get_u16_le();
14384        let tmp = buf.get_u8();
14385        __struct.fix_type =
14386            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
14387                enum_type: "GpsFixType",
14388                value: tmp as u32,
14389            })?;
14390        __struct.satellites_visible = buf.get_u8();
14391        __struct.dgps_numch = buf.get_u8();
14392        __struct.yaw = buf.get_u16_le();
14393        __struct.alt_ellipsoid = buf.get_i32_le();
14394        __struct.h_acc = buf.get_u32_le();
14395        __struct.v_acc = buf.get_u32_le();
14396        __struct.vel_acc = buf.get_u32_le();
14397        __struct.hdg_acc = buf.get_u32_le();
14398        Ok(__struct)
14399    }
14400    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14401        let mut __tmp = BytesMut::new(bytes);
14402        #[allow(clippy::absurd_extreme_comparisons)]
14403        #[allow(unused_comparisons)]
14404        if __tmp.remaining() < Self::ENCODED_LEN {
14405            panic!(
14406                "buffer is too small (need {} bytes, but got {})",
14407                Self::ENCODED_LEN,
14408                __tmp.remaining(),
14409            )
14410        }
14411        __tmp.put_u64_le(self.time_usec);
14412        __tmp.put_i32_le(self.lat);
14413        __tmp.put_i32_le(self.lon);
14414        __tmp.put_i32_le(self.alt);
14415        __tmp.put_u32_le(self.dgps_age);
14416        __tmp.put_u16_le(self.eph);
14417        __tmp.put_u16_le(self.epv);
14418        __tmp.put_u16_le(self.vel);
14419        __tmp.put_u16_le(self.cog);
14420        __tmp.put_u8(self.fix_type as u8);
14421        __tmp.put_u8(self.satellites_visible);
14422        __tmp.put_u8(self.dgps_numch);
14423        if matches!(version, MavlinkVersion::V2) {
14424            __tmp.put_u16_le(self.yaw);
14425            __tmp.put_i32_le(self.alt_ellipsoid);
14426            __tmp.put_u32_le(self.h_acc);
14427            __tmp.put_u32_le(self.v_acc);
14428            __tmp.put_u32_le(self.vel_acc);
14429            __tmp.put_u32_le(self.hdg_acc);
14430            let len = __tmp.len();
14431            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14432        } else {
14433            __tmp.len()
14434        }
14435    }
14436}
14437#[doc = "RTK GPS data. Gives information on the relative baseline calculation the GPS is reporting."]
14438#[doc = ""]
14439#[doc = "ID: 128"]
14440#[derive(Debug, Clone, PartialEq)]
14441#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14442#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14443pub struct GPS2_RTK_DATA {
14444    #[doc = "Time since boot of last baseline message received."]
14445    pub time_last_baseline_ms: u32,
14446    #[doc = "GPS Time of Week of last baseline"]
14447    pub tow: u32,
14448    #[doc = "Current baseline in ECEF x or NED north component."]
14449    pub baseline_a_mm: i32,
14450    #[doc = "Current baseline in ECEF y or NED east component."]
14451    pub baseline_b_mm: i32,
14452    #[doc = "Current baseline in ECEF z or NED down component."]
14453    pub baseline_c_mm: i32,
14454    #[doc = "Current estimate of baseline accuracy."]
14455    pub accuracy: u32,
14456    #[doc = "Current number of integer ambiguity hypotheses."]
14457    pub iar_num_hypotheses: i32,
14458    #[doc = "GPS Week Number of last baseline"]
14459    pub wn: u16,
14460    #[doc = "Identification of connected RTK receiver."]
14461    pub rtk_receiver_id: u8,
14462    #[doc = "GPS-specific health report for RTK data."]
14463    pub rtk_health: u8,
14464    #[doc = "Rate of baseline messages being received by GPS"]
14465    pub rtk_rate: u8,
14466    #[doc = "Current number of sats used for RTK calculation."]
14467    pub nsats: u8,
14468    #[doc = "Coordinate system of baseline"]
14469    pub baseline_coords_type: RtkBaselineCoordinateSystem,
14470}
14471impl GPS2_RTK_DATA {
14472    pub const ENCODED_LEN: usize = 35usize;
14473    pub const DEFAULT: Self = Self {
14474        time_last_baseline_ms: 0_u32,
14475        tow: 0_u32,
14476        baseline_a_mm: 0_i32,
14477        baseline_b_mm: 0_i32,
14478        baseline_c_mm: 0_i32,
14479        accuracy: 0_u32,
14480        iar_num_hypotheses: 0_i32,
14481        wn: 0_u16,
14482        rtk_receiver_id: 0_u8,
14483        rtk_health: 0_u8,
14484        rtk_rate: 0_u8,
14485        nsats: 0_u8,
14486        baseline_coords_type: RtkBaselineCoordinateSystem::DEFAULT,
14487    };
14488    #[cfg(feature = "arbitrary")]
14489    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14490        use arbitrary::{Arbitrary, Unstructured};
14491        let mut buf = [0u8; 1024];
14492        rng.fill_bytes(&mut buf);
14493        let mut unstructured = Unstructured::new(&buf);
14494        Self::arbitrary(&mut unstructured).unwrap_or_default()
14495    }
14496}
14497impl Default for GPS2_RTK_DATA {
14498    fn default() -> Self {
14499        Self::DEFAULT.clone()
14500    }
14501}
14502impl MessageData for GPS2_RTK_DATA {
14503    type Message = MavMessage;
14504    const ID: u32 = 128u32;
14505    const NAME: &'static str = "GPS2_RTK";
14506    const EXTRA_CRC: u8 = 226u8;
14507    const ENCODED_LEN: usize = 35usize;
14508    fn deser(
14509        _version: MavlinkVersion,
14510        __input: &[u8],
14511    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14512        let avail_len = __input.len();
14513        let mut payload_buf = [0; Self::ENCODED_LEN];
14514        let mut buf = if avail_len < Self::ENCODED_LEN {
14515            payload_buf[0..avail_len].copy_from_slice(__input);
14516            Bytes::new(&payload_buf)
14517        } else {
14518            Bytes::new(__input)
14519        };
14520        let mut __struct = Self::default();
14521        __struct.time_last_baseline_ms = buf.get_u32_le();
14522        __struct.tow = buf.get_u32_le();
14523        __struct.baseline_a_mm = buf.get_i32_le();
14524        __struct.baseline_b_mm = buf.get_i32_le();
14525        __struct.baseline_c_mm = buf.get_i32_le();
14526        __struct.accuracy = buf.get_u32_le();
14527        __struct.iar_num_hypotheses = buf.get_i32_le();
14528        __struct.wn = buf.get_u16_le();
14529        __struct.rtk_receiver_id = buf.get_u8();
14530        __struct.rtk_health = buf.get_u8();
14531        __struct.rtk_rate = buf.get_u8();
14532        __struct.nsats = buf.get_u8();
14533        let tmp = buf.get_u8();
14534        __struct.baseline_coords_type =
14535            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
14536                enum_type: "RtkBaselineCoordinateSystem",
14537                value: tmp as u32,
14538            })?;
14539        Ok(__struct)
14540    }
14541    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14542        let mut __tmp = BytesMut::new(bytes);
14543        #[allow(clippy::absurd_extreme_comparisons)]
14544        #[allow(unused_comparisons)]
14545        if __tmp.remaining() < Self::ENCODED_LEN {
14546            panic!(
14547                "buffer is too small (need {} bytes, but got {})",
14548                Self::ENCODED_LEN,
14549                __tmp.remaining(),
14550            )
14551        }
14552        __tmp.put_u32_le(self.time_last_baseline_ms);
14553        __tmp.put_u32_le(self.tow);
14554        __tmp.put_i32_le(self.baseline_a_mm);
14555        __tmp.put_i32_le(self.baseline_b_mm);
14556        __tmp.put_i32_le(self.baseline_c_mm);
14557        __tmp.put_u32_le(self.accuracy);
14558        __tmp.put_i32_le(self.iar_num_hypotheses);
14559        __tmp.put_u16_le(self.wn);
14560        __tmp.put_u8(self.rtk_receiver_id);
14561        __tmp.put_u8(self.rtk_health);
14562        __tmp.put_u8(self.rtk_rate);
14563        __tmp.put_u8(self.nsats);
14564        __tmp.put_u8(self.baseline_coords_type as u8);
14565        if matches!(version, MavlinkVersion::V2) {
14566            let len = __tmp.len();
14567            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14568        } else {
14569            __tmp.len()
14570        }
14571    }
14572}
14573#[doc = "Publishes the GPS coordinates of the vehicle local origin (0,0,0) position. Emitted whenever a new GPS-Local position mapping is requested or set - e.g. following SET_GPS_GLOBAL_ORIGIN message."]
14574#[doc = ""]
14575#[doc = "ID: 49"]
14576#[derive(Debug, Clone, PartialEq)]
14577#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14578#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14579pub struct GPS_GLOBAL_ORIGIN_DATA {
14580    #[doc = "Latitude (WGS84)"]
14581    pub latitude: i32,
14582    #[doc = "Longitude (WGS84)"]
14583    pub longitude: i32,
14584    #[doc = "Altitude (MSL). Positive for up."]
14585    pub altitude: i32,
14586    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
14587    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14588    pub time_usec: u64,
14589}
14590impl GPS_GLOBAL_ORIGIN_DATA {
14591    pub const ENCODED_LEN: usize = 20usize;
14592    pub const DEFAULT: Self = Self {
14593        latitude: 0_i32,
14594        longitude: 0_i32,
14595        altitude: 0_i32,
14596        time_usec: 0_u64,
14597    };
14598    #[cfg(feature = "arbitrary")]
14599    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14600        use arbitrary::{Arbitrary, Unstructured};
14601        let mut buf = [0u8; 1024];
14602        rng.fill_bytes(&mut buf);
14603        let mut unstructured = Unstructured::new(&buf);
14604        Self::arbitrary(&mut unstructured).unwrap_or_default()
14605    }
14606}
14607impl Default for GPS_GLOBAL_ORIGIN_DATA {
14608    fn default() -> Self {
14609        Self::DEFAULT.clone()
14610    }
14611}
14612impl MessageData for GPS_GLOBAL_ORIGIN_DATA {
14613    type Message = MavMessage;
14614    const ID: u32 = 49u32;
14615    const NAME: &'static str = "GPS_GLOBAL_ORIGIN";
14616    const EXTRA_CRC: u8 = 39u8;
14617    const ENCODED_LEN: usize = 20usize;
14618    fn deser(
14619        _version: MavlinkVersion,
14620        __input: &[u8],
14621    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14622        let avail_len = __input.len();
14623        let mut payload_buf = [0; Self::ENCODED_LEN];
14624        let mut buf = if avail_len < Self::ENCODED_LEN {
14625            payload_buf[0..avail_len].copy_from_slice(__input);
14626            Bytes::new(&payload_buf)
14627        } else {
14628            Bytes::new(__input)
14629        };
14630        let mut __struct = Self::default();
14631        __struct.latitude = buf.get_i32_le();
14632        __struct.longitude = buf.get_i32_le();
14633        __struct.altitude = buf.get_i32_le();
14634        __struct.time_usec = buf.get_u64_le();
14635        Ok(__struct)
14636    }
14637    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14638        let mut __tmp = BytesMut::new(bytes);
14639        #[allow(clippy::absurd_extreme_comparisons)]
14640        #[allow(unused_comparisons)]
14641        if __tmp.remaining() < Self::ENCODED_LEN {
14642            panic!(
14643                "buffer is too small (need {} bytes, but got {})",
14644                Self::ENCODED_LEN,
14645                __tmp.remaining(),
14646            )
14647        }
14648        __tmp.put_i32_le(self.latitude);
14649        __tmp.put_i32_le(self.longitude);
14650        __tmp.put_i32_le(self.altitude);
14651        if matches!(version, MavlinkVersion::V2) {
14652            __tmp.put_u64_le(self.time_usec);
14653            let len = __tmp.len();
14654            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14655        } else {
14656            __tmp.len()
14657        }
14658    }
14659}
14660#[deprecated = " See `GPS_RTCM_DATA` (Deprecated since 2022-05)"]
14661#[doc = "Data for injecting into the onboard GPS (used for DGPS)."]
14662#[doc = ""]
14663#[doc = "ID: 123"]
14664#[derive(Debug, Clone, PartialEq)]
14665#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14666#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14667pub struct GPS_INJECT_DATA_DATA {
14668    #[doc = "System ID"]
14669    pub target_system: u8,
14670    #[doc = "Component ID"]
14671    pub target_component: u8,
14672    #[doc = "Data length"]
14673    pub len: u8,
14674    #[doc = "Raw data (110 is enough for 12 satellites of RTCMv2)"]
14675    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14676    pub data: [u8; 110],
14677}
14678impl GPS_INJECT_DATA_DATA {
14679    pub const ENCODED_LEN: usize = 113usize;
14680    pub const DEFAULT: Self = Self {
14681        target_system: 0_u8,
14682        target_component: 0_u8,
14683        len: 0_u8,
14684        data: [0_u8; 110usize],
14685    };
14686    #[cfg(feature = "arbitrary")]
14687    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14688        use arbitrary::{Arbitrary, Unstructured};
14689        let mut buf = [0u8; 1024];
14690        rng.fill_bytes(&mut buf);
14691        let mut unstructured = Unstructured::new(&buf);
14692        Self::arbitrary(&mut unstructured).unwrap_or_default()
14693    }
14694}
14695impl Default for GPS_INJECT_DATA_DATA {
14696    fn default() -> Self {
14697        Self::DEFAULT.clone()
14698    }
14699}
14700impl MessageData for GPS_INJECT_DATA_DATA {
14701    type Message = MavMessage;
14702    const ID: u32 = 123u32;
14703    const NAME: &'static str = "GPS_INJECT_DATA";
14704    const EXTRA_CRC: u8 = 250u8;
14705    const ENCODED_LEN: usize = 113usize;
14706    fn deser(
14707        _version: MavlinkVersion,
14708        __input: &[u8],
14709    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14710        let avail_len = __input.len();
14711        let mut payload_buf = [0; Self::ENCODED_LEN];
14712        let mut buf = if avail_len < Self::ENCODED_LEN {
14713            payload_buf[0..avail_len].copy_from_slice(__input);
14714            Bytes::new(&payload_buf)
14715        } else {
14716            Bytes::new(__input)
14717        };
14718        let mut __struct = Self::default();
14719        __struct.target_system = buf.get_u8();
14720        __struct.target_component = buf.get_u8();
14721        __struct.len = buf.get_u8();
14722        for v in &mut __struct.data {
14723            let val = buf.get_u8();
14724            *v = val;
14725        }
14726        Ok(__struct)
14727    }
14728    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14729        let mut __tmp = BytesMut::new(bytes);
14730        #[allow(clippy::absurd_extreme_comparisons)]
14731        #[allow(unused_comparisons)]
14732        if __tmp.remaining() < Self::ENCODED_LEN {
14733            panic!(
14734                "buffer is too small (need {} bytes, but got {})",
14735                Self::ENCODED_LEN,
14736                __tmp.remaining(),
14737            )
14738        }
14739        __tmp.put_u8(self.target_system);
14740        __tmp.put_u8(self.target_component);
14741        __tmp.put_u8(self.len);
14742        for val in &self.data {
14743            __tmp.put_u8(*val);
14744        }
14745        if matches!(version, MavlinkVersion::V2) {
14746            let len = __tmp.len();
14747            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14748        } else {
14749            __tmp.len()
14750        }
14751    }
14752}
14753#[doc = "GPS sensor input message.  This is a raw sensor value sent by the GPS. This is NOT the global position estimate of the system."]
14754#[doc = ""]
14755#[doc = "ID: 232"]
14756#[derive(Debug, Clone, PartialEq)]
14757#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14758#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14759pub struct GPS_INPUT_DATA {
14760    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
14761    pub time_usec: u64,
14762    #[doc = "GPS time (from start of GPS week)"]
14763    pub time_week_ms: u32,
14764    #[doc = "Latitude (WGS84)"]
14765    pub lat: i32,
14766    #[doc = "Longitude (WGS84)"]
14767    pub lon: i32,
14768    #[doc = "Altitude (MSL). Positive for up."]
14769    pub alt: f32,
14770    #[doc = "GPS HDOP horizontal dilution of position (unitless). If unknown, set to: UINT16_MAX"]
14771    pub hdop: f32,
14772    #[doc = "GPS VDOP vertical dilution of position (unitless). If unknown, set to: UINT16_MAX"]
14773    pub vdop: f32,
14774    #[doc = "GPS velocity in north direction in earth-fixed NED frame"]
14775    pub vn: f32,
14776    #[doc = "GPS velocity in east direction in earth-fixed NED frame"]
14777    pub ve: f32,
14778    #[doc = "GPS velocity in down direction in earth-fixed NED frame"]
14779    pub vd: f32,
14780    #[doc = "GPS speed accuracy"]
14781    pub speed_accuracy: f32,
14782    #[doc = "GPS horizontal accuracy"]
14783    pub horiz_accuracy: f32,
14784    #[doc = "GPS vertical accuracy"]
14785    pub vert_accuracy: f32,
14786    #[doc = "Bitmap indicating which GPS input flags fields to ignore.  All other fields must be provided."]
14787    pub ignore_flags: GpsInputIgnoreFlags,
14788    #[doc = "GPS week number"]
14789    pub time_week: u16,
14790    #[doc = "ID of the GPS for multiple GPS inputs"]
14791    pub gps_id: u8,
14792    #[doc = "0-1: no fix, 2: 2D fix, 3: 3D fix. 4: 3D with DGPS. 5: 3D with RTK"]
14793    pub fix_type: u8,
14794    #[doc = "Number of satellites visible."]
14795    pub satellites_visible: u8,
14796    #[doc = "Yaw of vehicle relative to Earth's North, zero means not available, use 36000 for north"]
14797    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14798    pub yaw: u16,
14799}
14800impl GPS_INPUT_DATA {
14801    pub const ENCODED_LEN: usize = 65usize;
14802    pub const DEFAULT: Self = Self {
14803        time_usec: 0_u64,
14804        time_week_ms: 0_u32,
14805        lat: 0_i32,
14806        lon: 0_i32,
14807        alt: 0.0_f32,
14808        hdop: 0.0_f32,
14809        vdop: 0.0_f32,
14810        vn: 0.0_f32,
14811        ve: 0.0_f32,
14812        vd: 0.0_f32,
14813        speed_accuracy: 0.0_f32,
14814        horiz_accuracy: 0.0_f32,
14815        vert_accuracy: 0.0_f32,
14816        ignore_flags: GpsInputIgnoreFlags::DEFAULT,
14817        time_week: 0_u16,
14818        gps_id: 0_u8,
14819        fix_type: 0_u8,
14820        satellites_visible: 0_u8,
14821        yaw: 0_u16,
14822    };
14823    #[cfg(feature = "arbitrary")]
14824    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14825        use arbitrary::{Arbitrary, Unstructured};
14826        let mut buf = [0u8; 1024];
14827        rng.fill_bytes(&mut buf);
14828        let mut unstructured = Unstructured::new(&buf);
14829        Self::arbitrary(&mut unstructured).unwrap_or_default()
14830    }
14831}
14832impl Default for GPS_INPUT_DATA {
14833    fn default() -> Self {
14834        Self::DEFAULT.clone()
14835    }
14836}
14837impl MessageData for GPS_INPUT_DATA {
14838    type Message = MavMessage;
14839    const ID: u32 = 232u32;
14840    const NAME: &'static str = "GPS_INPUT";
14841    const EXTRA_CRC: u8 = 151u8;
14842    const ENCODED_LEN: usize = 65usize;
14843    fn deser(
14844        _version: MavlinkVersion,
14845        __input: &[u8],
14846    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14847        let avail_len = __input.len();
14848        let mut payload_buf = [0; Self::ENCODED_LEN];
14849        let mut buf = if avail_len < Self::ENCODED_LEN {
14850            payload_buf[0..avail_len].copy_from_slice(__input);
14851            Bytes::new(&payload_buf)
14852        } else {
14853            Bytes::new(__input)
14854        };
14855        let mut __struct = Self::default();
14856        __struct.time_usec = buf.get_u64_le();
14857        __struct.time_week_ms = buf.get_u32_le();
14858        __struct.lat = buf.get_i32_le();
14859        __struct.lon = buf.get_i32_le();
14860        __struct.alt = buf.get_f32_le();
14861        __struct.hdop = buf.get_f32_le();
14862        __struct.vdop = buf.get_f32_le();
14863        __struct.vn = buf.get_f32_le();
14864        __struct.ve = buf.get_f32_le();
14865        __struct.vd = buf.get_f32_le();
14866        __struct.speed_accuracy = buf.get_f32_le();
14867        __struct.horiz_accuracy = buf.get_f32_le();
14868        __struct.vert_accuracy = buf.get_f32_le();
14869        let tmp = buf.get_u16_le();
14870        __struct.ignore_flags = GpsInputIgnoreFlags::from_bits(
14871            tmp & GpsInputIgnoreFlags::all().bits(),
14872        )
14873        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
14874            flag_type: "GpsInputIgnoreFlags",
14875            value: tmp as u32,
14876        })?;
14877        __struct.time_week = buf.get_u16_le();
14878        __struct.gps_id = buf.get_u8();
14879        __struct.fix_type = buf.get_u8();
14880        __struct.satellites_visible = buf.get_u8();
14881        __struct.yaw = buf.get_u16_le();
14882        Ok(__struct)
14883    }
14884    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14885        let mut __tmp = BytesMut::new(bytes);
14886        #[allow(clippy::absurd_extreme_comparisons)]
14887        #[allow(unused_comparisons)]
14888        if __tmp.remaining() < Self::ENCODED_LEN {
14889            panic!(
14890                "buffer is too small (need {} bytes, but got {})",
14891                Self::ENCODED_LEN,
14892                __tmp.remaining(),
14893            )
14894        }
14895        __tmp.put_u64_le(self.time_usec);
14896        __tmp.put_u32_le(self.time_week_ms);
14897        __tmp.put_i32_le(self.lat);
14898        __tmp.put_i32_le(self.lon);
14899        __tmp.put_f32_le(self.alt);
14900        __tmp.put_f32_le(self.hdop);
14901        __tmp.put_f32_le(self.vdop);
14902        __tmp.put_f32_le(self.vn);
14903        __tmp.put_f32_le(self.ve);
14904        __tmp.put_f32_le(self.vd);
14905        __tmp.put_f32_le(self.speed_accuracy);
14906        __tmp.put_f32_le(self.horiz_accuracy);
14907        __tmp.put_f32_le(self.vert_accuracy);
14908        __tmp.put_u16_le(self.ignore_flags.bits());
14909        __tmp.put_u16_le(self.time_week);
14910        __tmp.put_u8(self.gps_id);
14911        __tmp.put_u8(self.fix_type);
14912        __tmp.put_u8(self.satellites_visible);
14913        if matches!(version, MavlinkVersion::V2) {
14914            __tmp.put_u16_le(self.yaw);
14915            let len = __tmp.len();
14916            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14917        } else {
14918            __tmp.len()
14919        }
14920    }
14921}
14922#[doc = "The global position, as returned by the Global Positioning System (GPS). This is                 NOT the global position estimate of the system, but rather a RAW sensor value. See message GLOBAL_POSITION_INT for the global position estimate."]
14923#[doc = ""]
14924#[doc = "ID: 24"]
14925#[derive(Debug, Clone, PartialEq)]
14926#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14927#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14928pub struct GPS_RAW_INT_DATA {
14929    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
14930    pub time_usec: u64,
14931    #[doc = "Latitude (WGS84, EGM96 ellipsoid)"]
14932    pub lat: i32,
14933    #[doc = "Longitude (WGS84, EGM96 ellipsoid)"]
14934    pub lon: i32,
14935    #[doc = "Altitude (MSL). Positive for up. Note that virtually all GPS modules provide the MSL altitude in addition to the WGS84 altitude."]
14936    pub alt: i32,
14937    #[doc = "GPS HDOP horizontal dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
14938    pub eph: u16,
14939    #[doc = "GPS VDOP vertical dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
14940    pub epv: u16,
14941    #[doc = "GPS ground speed. If unknown, set to: UINT16_MAX"]
14942    pub vel: u16,
14943    #[doc = "Course over ground (NOT heading, but direction of movement) in degrees * 100, 0.0..359.99 degrees. If unknown, set to: UINT16_MAX"]
14944    pub cog: u16,
14945    #[doc = "GPS fix type."]
14946    pub fix_type: GpsFixType,
14947    #[doc = "Number of satellites visible. If unknown, set to UINT8_MAX"]
14948    pub satellites_visible: u8,
14949    #[doc = "Altitude (above WGS84, EGM96 ellipsoid). Positive for up."]
14950    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14951    pub alt_ellipsoid: i32,
14952    #[doc = "Position uncertainty."]
14953    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14954    pub h_acc: u32,
14955    #[doc = "Altitude uncertainty."]
14956    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14957    pub v_acc: u32,
14958    #[doc = "Speed uncertainty."]
14959    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14960    pub vel_acc: u32,
14961    #[doc = "Heading / track uncertainty"]
14962    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14963    pub hdg_acc: u32,
14964    #[doc = "Yaw in earth frame from north. Use 0 if this GPS does not provide yaw. Use UINT16_MAX if this GPS is configured to provide yaw and is currently unable to provide it. Use 36000 for north."]
14965    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14966    pub yaw: u16,
14967}
14968impl GPS_RAW_INT_DATA {
14969    pub const ENCODED_LEN: usize = 52usize;
14970    pub const DEFAULT: Self = Self {
14971        time_usec: 0_u64,
14972        lat: 0_i32,
14973        lon: 0_i32,
14974        alt: 0_i32,
14975        eph: 0_u16,
14976        epv: 0_u16,
14977        vel: 0_u16,
14978        cog: 0_u16,
14979        fix_type: GpsFixType::DEFAULT,
14980        satellites_visible: 0_u8,
14981        alt_ellipsoid: 0_i32,
14982        h_acc: 0_u32,
14983        v_acc: 0_u32,
14984        vel_acc: 0_u32,
14985        hdg_acc: 0_u32,
14986        yaw: 0_u16,
14987    };
14988    #[cfg(feature = "arbitrary")]
14989    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14990        use arbitrary::{Arbitrary, Unstructured};
14991        let mut buf = [0u8; 1024];
14992        rng.fill_bytes(&mut buf);
14993        let mut unstructured = Unstructured::new(&buf);
14994        Self::arbitrary(&mut unstructured).unwrap_or_default()
14995    }
14996}
14997impl Default for GPS_RAW_INT_DATA {
14998    fn default() -> Self {
14999        Self::DEFAULT.clone()
15000    }
15001}
15002impl MessageData for GPS_RAW_INT_DATA {
15003    type Message = MavMessage;
15004    const ID: u32 = 24u32;
15005    const NAME: &'static str = "GPS_RAW_INT";
15006    const EXTRA_CRC: u8 = 24u8;
15007    const ENCODED_LEN: usize = 52usize;
15008    fn deser(
15009        _version: MavlinkVersion,
15010        __input: &[u8],
15011    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15012        let avail_len = __input.len();
15013        let mut payload_buf = [0; Self::ENCODED_LEN];
15014        let mut buf = if avail_len < Self::ENCODED_LEN {
15015            payload_buf[0..avail_len].copy_from_slice(__input);
15016            Bytes::new(&payload_buf)
15017        } else {
15018            Bytes::new(__input)
15019        };
15020        let mut __struct = Self::default();
15021        __struct.time_usec = buf.get_u64_le();
15022        __struct.lat = buf.get_i32_le();
15023        __struct.lon = buf.get_i32_le();
15024        __struct.alt = buf.get_i32_le();
15025        __struct.eph = buf.get_u16_le();
15026        __struct.epv = buf.get_u16_le();
15027        __struct.vel = buf.get_u16_le();
15028        __struct.cog = buf.get_u16_le();
15029        let tmp = buf.get_u8();
15030        __struct.fix_type =
15031            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15032                enum_type: "GpsFixType",
15033                value: tmp as u32,
15034            })?;
15035        __struct.satellites_visible = buf.get_u8();
15036        __struct.alt_ellipsoid = buf.get_i32_le();
15037        __struct.h_acc = buf.get_u32_le();
15038        __struct.v_acc = buf.get_u32_le();
15039        __struct.vel_acc = buf.get_u32_le();
15040        __struct.hdg_acc = buf.get_u32_le();
15041        __struct.yaw = buf.get_u16_le();
15042        Ok(__struct)
15043    }
15044    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15045        let mut __tmp = BytesMut::new(bytes);
15046        #[allow(clippy::absurd_extreme_comparisons)]
15047        #[allow(unused_comparisons)]
15048        if __tmp.remaining() < Self::ENCODED_LEN {
15049            panic!(
15050                "buffer is too small (need {} bytes, but got {})",
15051                Self::ENCODED_LEN,
15052                __tmp.remaining(),
15053            )
15054        }
15055        __tmp.put_u64_le(self.time_usec);
15056        __tmp.put_i32_le(self.lat);
15057        __tmp.put_i32_le(self.lon);
15058        __tmp.put_i32_le(self.alt);
15059        __tmp.put_u16_le(self.eph);
15060        __tmp.put_u16_le(self.epv);
15061        __tmp.put_u16_le(self.vel);
15062        __tmp.put_u16_le(self.cog);
15063        __tmp.put_u8(self.fix_type as u8);
15064        __tmp.put_u8(self.satellites_visible);
15065        if matches!(version, MavlinkVersion::V2) {
15066            __tmp.put_i32_le(self.alt_ellipsoid);
15067            __tmp.put_u32_le(self.h_acc);
15068            __tmp.put_u32_le(self.v_acc);
15069            __tmp.put_u32_le(self.vel_acc);
15070            __tmp.put_u32_le(self.hdg_acc);
15071            __tmp.put_u16_le(self.yaw);
15072            let len = __tmp.len();
15073            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15074        } else {
15075            __tmp.len()
15076        }
15077    }
15078}
15079#[doc = "RTCM message for injecting into the onboard GPS (used for DGPS)."]
15080#[doc = ""]
15081#[doc = "ID: 233"]
15082#[derive(Debug, Clone, PartialEq)]
15083#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15084#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15085pub struct GPS_RTCM_DATA_DATA {
15086    #[doc = "LSB: 1 means message is fragmented, next 2 bits are the fragment ID, the remaining 5 bits are used for the sequence ID. Messages are only to be flushed to the GPS when the entire message has been reconstructed on the autopilot. The fragment ID specifies which order the fragments should be assembled into a buffer, while the sequence ID is used to detect a mismatch between different buffers. The buffer is considered fully reconstructed when either all 4 fragments are present, or all the fragments before the first fragment with a non full payload is received. This management is used to ensure that normal GPS operation doesn't corrupt RTCM data, and to recover from a unreliable transport delivery order."]
15087    pub flags: u8,
15088    #[doc = "data length"]
15089    pub len: u8,
15090    #[doc = "RTCM message (may be fragmented)"]
15091    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
15092    pub data: [u8; 180],
15093}
15094impl GPS_RTCM_DATA_DATA {
15095    pub const ENCODED_LEN: usize = 182usize;
15096    pub const DEFAULT: Self = Self {
15097        flags: 0_u8,
15098        len: 0_u8,
15099        data: [0_u8; 180usize],
15100    };
15101    #[cfg(feature = "arbitrary")]
15102    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15103        use arbitrary::{Arbitrary, Unstructured};
15104        let mut buf = [0u8; 1024];
15105        rng.fill_bytes(&mut buf);
15106        let mut unstructured = Unstructured::new(&buf);
15107        Self::arbitrary(&mut unstructured).unwrap_or_default()
15108    }
15109}
15110impl Default for GPS_RTCM_DATA_DATA {
15111    fn default() -> Self {
15112        Self::DEFAULT.clone()
15113    }
15114}
15115impl MessageData for GPS_RTCM_DATA_DATA {
15116    type Message = MavMessage;
15117    const ID: u32 = 233u32;
15118    const NAME: &'static str = "GPS_RTCM_DATA";
15119    const EXTRA_CRC: u8 = 35u8;
15120    const ENCODED_LEN: usize = 182usize;
15121    fn deser(
15122        _version: MavlinkVersion,
15123        __input: &[u8],
15124    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15125        let avail_len = __input.len();
15126        let mut payload_buf = [0; Self::ENCODED_LEN];
15127        let mut buf = if avail_len < Self::ENCODED_LEN {
15128            payload_buf[0..avail_len].copy_from_slice(__input);
15129            Bytes::new(&payload_buf)
15130        } else {
15131            Bytes::new(__input)
15132        };
15133        let mut __struct = Self::default();
15134        __struct.flags = buf.get_u8();
15135        __struct.len = buf.get_u8();
15136        for v in &mut __struct.data {
15137            let val = buf.get_u8();
15138            *v = val;
15139        }
15140        Ok(__struct)
15141    }
15142    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15143        let mut __tmp = BytesMut::new(bytes);
15144        #[allow(clippy::absurd_extreme_comparisons)]
15145        #[allow(unused_comparisons)]
15146        if __tmp.remaining() < Self::ENCODED_LEN {
15147            panic!(
15148                "buffer is too small (need {} bytes, but got {})",
15149                Self::ENCODED_LEN,
15150                __tmp.remaining(),
15151            )
15152        }
15153        __tmp.put_u8(self.flags);
15154        __tmp.put_u8(self.len);
15155        for val in &self.data {
15156            __tmp.put_u8(*val);
15157        }
15158        if matches!(version, MavlinkVersion::V2) {
15159            let len = __tmp.len();
15160            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15161        } else {
15162            __tmp.len()
15163        }
15164    }
15165}
15166#[doc = "RTK GPS data. Gives information on the relative baseline calculation the GPS is reporting."]
15167#[doc = ""]
15168#[doc = "ID: 127"]
15169#[derive(Debug, Clone, PartialEq)]
15170#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15171#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15172pub struct GPS_RTK_DATA {
15173    #[doc = "Time since boot of last baseline message received."]
15174    pub time_last_baseline_ms: u32,
15175    #[doc = "GPS Time of Week of last baseline"]
15176    pub tow: u32,
15177    #[doc = "Current baseline in ECEF x or NED north component."]
15178    pub baseline_a_mm: i32,
15179    #[doc = "Current baseline in ECEF y or NED east component."]
15180    pub baseline_b_mm: i32,
15181    #[doc = "Current baseline in ECEF z or NED down component."]
15182    pub baseline_c_mm: i32,
15183    #[doc = "Current estimate of baseline accuracy."]
15184    pub accuracy: u32,
15185    #[doc = "Current number of integer ambiguity hypotheses."]
15186    pub iar_num_hypotheses: i32,
15187    #[doc = "GPS Week Number of last baseline"]
15188    pub wn: u16,
15189    #[doc = "Identification of connected RTK receiver."]
15190    pub rtk_receiver_id: u8,
15191    #[doc = "GPS-specific health report for RTK data."]
15192    pub rtk_health: u8,
15193    #[doc = "Rate of baseline messages being received by GPS"]
15194    pub rtk_rate: u8,
15195    #[doc = "Current number of sats used for RTK calculation."]
15196    pub nsats: u8,
15197    #[doc = "Coordinate system of baseline"]
15198    pub baseline_coords_type: RtkBaselineCoordinateSystem,
15199}
15200impl GPS_RTK_DATA {
15201    pub const ENCODED_LEN: usize = 35usize;
15202    pub const DEFAULT: Self = Self {
15203        time_last_baseline_ms: 0_u32,
15204        tow: 0_u32,
15205        baseline_a_mm: 0_i32,
15206        baseline_b_mm: 0_i32,
15207        baseline_c_mm: 0_i32,
15208        accuracy: 0_u32,
15209        iar_num_hypotheses: 0_i32,
15210        wn: 0_u16,
15211        rtk_receiver_id: 0_u8,
15212        rtk_health: 0_u8,
15213        rtk_rate: 0_u8,
15214        nsats: 0_u8,
15215        baseline_coords_type: RtkBaselineCoordinateSystem::DEFAULT,
15216    };
15217    #[cfg(feature = "arbitrary")]
15218    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15219        use arbitrary::{Arbitrary, Unstructured};
15220        let mut buf = [0u8; 1024];
15221        rng.fill_bytes(&mut buf);
15222        let mut unstructured = Unstructured::new(&buf);
15223        Self::arbitrary(&mut unstructured).unwrap_or_default()
15224    }
15225}
15226impl Default for GPS_RTK_DATA {
15227    fn default() -> Self {
15228        Self::DEFAULT.clone()
15229    }
15230}
15231impl MessageData for GPS_RTK_DATA {
15232    type Message = MavMessage;
15233    const ID: u32 = 127u32;
15234    const NAME: &'static str = "GPS_RTK";
15235    const EXTRA_CRC: u8 = 25u8;
15236    const ENCODED_LEN: usize = 35usize;
15237    fn deser(
15238        _version: MavlinkVersion,
15239        __input: &[u8],
15240    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15241        let avail_len = __input.len();
15242        let mut payload_buf = [0; Self::ENCODED_LEN];
15243        let mut buf = if avail_len < Self::ENCODED_LEN {
15244            payload_buf[0..avail_len].copy_from_slice(__input);
15245            Bytes::new(&payload_buf)
15246        } else {
15247            Bytes::new(__input)
15248        };
15249        let mut __struct = Self::default();
15250        __struct.time_last_baseline_ms = buf.get_u32_le();
15251        __struct.tow = buf.get_u32_le();
15252        __struct.baseline_a_mm = buf.get_i32_le();
15253        __struct.baseline_b_mm = buf.get_i32_le();
15254        __struct.baseline_c_mm = buf.get_i32_le();
15255        __struct.accuracy = buf.get_u32_le();
15256        __struct.iar_num_hypotheses = buf.get_i32_le();
15257        __struct.wn = buf.get_u16_le();
15258        __struct.rtk_receiver_id = buf.get_u8();
15259        __struct.rtk_health = buf.get_u8();
15260        __struct.rtk_rate = buf.get_u8();
15261        __struct.nsats = buf.get_u8();
15262        let tmp = buf.get_u8();
15263        __struct.baseline_coords_type =
15264            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15265                enum_type: "RtkBaselineCoordinateSystem",
15266                value: tmp as u32,
15267            })?;
15268        Ok(__struct)
15269    }
15270    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15271        let mut __tmp = BytesMut::new(bytes);
15272        #[allow(clippy::absurd_extreme_comparisons)]
15273        #[allow(unused_comparisons)]
15274        if __tmp.remaining() < Self::ENCODED_LEN {
15275            panic!(
15276                "buffer is too small (need {} bytes, but got {})",
15277                Self::ENCODED_LEN,
15278                __tmp.remaining(),
15279            )
15280        }
15281        __tmp.put_u32_le(self.time_last_baseline_ms);
15282        __tmp.put_u32_le(self.tow);
15283        __tmp.put_i32_le(self.baseline_a_mm);
15284        __tmp.put_i32_le(self.baseline_b_mm);
15285        __tmp.put_i32_le(self.baseline_c_mm);
15286        __tmp.put_u32_le(self.accuracy);
15287        __tmp.put_i32_le(self.iar_num_hypotheses);
15288        __tmp.put_u16_le(self.wn);
15289        __tmp.put_u8(self.rtk_receiver_id);
15290        __tmp.put_u8(self.rtk_health);
15291        __tmp.put_u8(self.rtk_rate);
15292        __tmp.put_u8(self.nsats);
15293        __tmp.put_u8(self.baseline_coords_type as u8);
15294        if matches!(version, MavlinkVersion::V2) {
15295            let len = __tmp.len();
15296            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15297        } else {
15298            __tmp.len()
15299        }
15300    }
15301}
15302#[doc = "The positioning status, as reported by GPS. This message is intended to display status information about each satellite visible to the receiver. See message GLOBAL_POSITION_INT for the global position estimate. This message can contain information for up to 20 satellites."]
15303#[doc = ""]
15304#[doc = "ID: 25"]
15305#[derive(Debug, Clone, PartialEq)]
15306#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15307#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15308pub struct GPS_STATUS_DATA {
15309    #[doc = "Number of satellites visible"]
15310    pub satellites_visible: u8,
15311    #[doc = "Global satellite ID"]
15312    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
15313    pub satellite_prn: [u8; 20],
15314    #[doc = "0: Satellite not used, 1: used for localization"]
15315    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
15316    pub satellite_used: [u8; 20],
15317    #[doc = "Elevation (0: right on top of receiver, 90: on the horizon) of satellite"]
15318    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
15319    pub satellite_elevation: [u8; 20],
15320    #[doc = "Direction of satellite, 0: 0 deg, 255: 360 deg."]
15321    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
15322    pub satellite_azimuth: [u8; 20],
15323    #[doc = "Signal to noise ratio of satellite"]
15324    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
15325    pub satellite_snr: [u8; 20],
15326}
15327impl GPS_STATUS_DATA {
15328    pub const ENCODED_LEN: usize = 101usize;
15329    pub const DEFAULT: Self = Self {
15330        satellites_visible: 0_u8,
15331        satellite_prn: [0_u8; 20usize],
15332        satellite_used: [0_u8; 20usize],
15333        satellite_elevation: [0_u8; 20usize],
15334        satellite_azimuth: [0_u8; 20usize],
15335        satellite_snr: [0_u8; 20usize],
15336    };
15337    #[cfg(feature = "arbitrary")]
15338    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15339        use arbitrary::{Arbitrary, Unstructured};
15340        let mut buf = [0u8; 1024];
15341        rng.fill_bytes(&mut buf);
15342        let mut unstructured = Unstructured::new(&buf);
15343        Self::arbitrary(&mut unstructured).unwrap_or_default()
15344    }
15345}
15346impl Default for GPS_STATUS_DATA {
15347    fn default() -> Self {
15348        Self::DEFAULT.clone()
15349    }
15350}
15351impl MessageData for GPS_STATUS_DATA {
15352    type Message = MavMessage;
15353    const ID: u32 = 25u32;
15354    const NAME: &'static str = "GPS_STATUS";
15355    const EXTRA_CRC: u8 = 23u8;
15356    const ENCODED_LEN: usize = 101usize;
15357    fn deser(
15358        _version: MavlinkVersion,
15359        __input: &[u8],
15360    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15361        let avail_len = __input.len();
15362        let mut payload_buf = [0; Self::ENCODED_LEN];
15363        let mut buf = if avail_len < Self::ENCODED_LEN {
15364            payload_buf[0..avail_len].copy_from_slice(__input);
15365            Bytes::new(&payload_buf)
15366        } else {
15367            Bytes::new(__input)
15368        };
15369        let mut __struct = Self::default();
15370        __struct.satellites_visible = buf.get_u8();
15371        for v in &mut __struct.satellite_prn {
15372            let val = buf.get_u8();
15373            *v = val;
15374        }
15375        for v in &mut __struct.satellite_used {
15376            let val = buf.get_u8();
15377            *v = val;
15378        }
15379        for v in &mut __struct.satellite_elevation {
15380            let val = buf.get_u8();
15381            *v = val;
15382        }
15383        for v in &mut __struct.satellite_azimuth {
15384            let val = buf.get_u8();
15385            *v = val;
15386        }
15387        for v in &mut __struct.satellite_snr {
15388            let val = buf.get_u8();
15389            *v = val;
15390        }
15391        Ok(__struct)
15392    }
15393    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15394        let mut __tmp = BytesMut::new(bytes);
15395        #[allow(clippy::absurd_extreme_comparisons)]
15396        #[allow(unused_comparisons)]
15397        if __tmp.remaining() < Self::ENCODED_LEN {
15398            panic!(
15399                "buffer is too small (need {} bytes, but got {})",
15400                Self::ENCODED_LEN,
15401                __tmp.remaining(),
15402            )
15403        }
15404        __tmp.put_u8(self.satellites_visible);
15405        for val in &self.satellite_prn {
15406            __tmp.put_u8(*val);
15407        }
15408        for val in &self.satellite_used {
15409            __tmp.put_u8(*val);
15410        }
15411        for val in &self.satellite_elevation {
15412            __tmp.put_u8(*val);
15413        }
15414        for val in &self.satellite_azimuth {
15415            __tmp.put_u8(*val);
15416        }
15417        for val in &self.satellite_snr {
15418            __tmp.put_u8(*val);
15419        }
15420        if matches!(version, MavlinkVersion::V2) {
15421            let len = __tmp.len();
15422            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15423        } else {
15424            __tmp.len()
15425        }
15426    }
15427}
15428#[doc = "Status of GSM modem (connected to onboard computer)."]
15429#[doc = ""]
15430#[doc = "ID: 8014"]
15431#[derive(Debug, Clone, PartialEq)]
15432#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15433#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15434pub struct GSM_LINK_STATUS_DATA {
15435    #[doc = "Timestamp (of OBC)"]
15436    pub timestamp: u64,
15437    #[doc = "GSM modem used"]
15438    pub gsm_modem_type: GsmModemType,
15439    #[doc = "GSM link type"]
15440    pub gsm_link_type: GsmLinkType,
15441    #[doc = "RSSI as reported by modem (unconverted)"]
15442    pub rssi: u8,
15443    #[doc = "RSRP (LTE) or RSCP (WCDMA) as reported by modem (unconverted)"]
15444    pub rsrp_rscp: u8,
15445    #[doc = "SINR (LTE) or ECIO (WCDMA) as reported by modem (unconverted)"]
15446    pub sinr_ecio: u8,
15447    #[doc = "RSRQ (LTE only) as reported by modem (unconverted)"]
15448    pub rsrq: u8,
15449}
15450impl GSM_LINK_STATUS_DATA {
15451    pub const ENCODED_LEN: usize = 14usize;
15452    pub const DEFAULT: Self = Self {
15453        timestamp: 0_u64,
15454        gsm_modem_type: GsmModemType::DEFAULT,
15455        gsm_link_type: GsmLinkType::DEFAULT,
15456        rssi: 0_u8,
15457        rsrp_rscp: 0_u8,
15458        sinr_ecio: 0_u8,
15459        rsrq: 0_u8,
15460    };
15461    #[cfg(feature = "arbitrary")]
15462    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15463        use arbitrary::{Arbitrary, Unstructured};
15464        let mut buf = [0u8; 1024];
15465        rng.fill_bytes(&mut buf);
15466        let mut unstructured = Unstructured::new(&buf);
15467        Self::arbitrary(&mut unstructured).unwrap_or_default()
15468    }
15469}
15470impl Default for GSM_LINK_STATUS_DATA {
15471    fn default() -> Self {
15472        Self::DEFAULT.clone()
15473    }
15474}
15475impl MessageData for GSM_LINK_STATUS_DATA {
15476    type Message = MavMessage;
15477    const ID: u32 = 8014u32;
15478    const NAME: &'static str = "GSM_LINK_STATUS";
15479    const EXTRA_CRC: u8 = 200u8;
15480    const ENCODED_LEN: usize = 14usize;
15481    fn deser(
15482        _version: MavlinkVersion,
15483        __input: &[u8],
15484    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15485        let avail_len = __input.len();
15486        let mut payload_buf = [0; Self::ENCODED_LEN];
15487        let mut buf = if avail_len < Self::ENCODED_LEN {
15488            payload_buf[0..avail_len].copy_from_slice(__input);
15489            Bytes::new(&payload_buf)
15490        } else {
15491            Bytes::new(__input)
15492        };
15493        let mut __struct = Self::default();
15494        __struct.timestamp = buf.get_u64_le();
15495        let tmp = buf.get_u8();
15496        __struct.gsm_modem_type =
15497            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15498                enum_type: "GsmModemType",
15499                value: tmp as u32,
15500            })?;
15501        let tmp = buf.get_u8();
15502        __struct.gsm_link_type =
15503            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15504                enum_type: "GsmLinkType",
15505                value: tmp as u32,
15506            })?;
15507        __struct.rssi = buf.get_u8();
15508        __struct.rsrp_rscp = buf.get_u8();
15509        __struct.sinr_ecio = buf.get_u8();
15510        __struct.rsrq = buf.get_u8();
15511        Ok(__struct)
15512    }
15513    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15514        let mut __tmp = BytesMut::new(bytes);
15515        #[allow(clippy::absurd_extreme_comparisons)]
15516        #[allow(unused_comparisons)]
15517        if __tmp.remaining() < Self::ENCODED_LEN {
15518            panic!(
15519                "buffer is too small (need {} bytes, but got {})",
15520                Self::ENCODED_LEN,
15521                __tmp.remaining(),
15522            )
15523        }
15524        __tmp.put_u64_le(self.timestamp);
15525        __tmp.put_u8(self.gsm_modem_type as u8);
15526        __tmp.put_u8(self.gsm_link_type as u8);
15527        __tmp.put_u8(self.rssi);
15528        __tmp.put_u8(self.rsrp_rscp);
15529        __tmp.put_u8(self.sinr_ecio);
15530        __tmp.put_u8(self.rsrq);
15531        if matches!(version, MavlinkVersion::V2) {
15532            let len = __tmp.len();
15533            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15534        } else {
15535            __tmp.len()
15536        }
15537    }
15538}
15539#[doc = "The heartbeat message shows that a system or component is present and responding. The type and autopilot fields (along with the message component id), allow the receiving system to treat further messages from this system appropriately (e.g. by laying out the user interface based on the autopilot). This microservice is documented at <https://mavlink.io/en/services/heartbeat.html>."]
15540#[doc = ""]
15541#[doc = "ID: 0"]
15542#[derive(Debug, Clone, PartialEq)]
15543#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15544#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15545pub struct HEARTBEAT_DATA {
15546    #[doc = "A bitfield for use for autopilot-specific flags"]
15547    pub custom_mode: u32,
15548    #[doc = "Vehicle or component type. For a flight controller component the vehicle type (quadrotor, helicopter, etc.). For other components the component type (e.g. camera, gimbal, etc.). This should be used in preference to component id for identifying the component type."]
15549    pub mavtype: MavType,
15550    #[doc = "Autopilot type / class. Use MAV_AUTOPILOT_INVALID for components that are not flight controllers."]
15551    pub autopilot: MavAutopilot,
15552    #[doc = "System mode bitmap."]
15553    pub base_mode: MavModeFlag,
15554    #[doc = "System status flag."]
15555    pub system_status: MavState,
15556    #[doc = "MAVLink version, not writable by user, gets added by protocol because of magic data type: uint8_t_mavlink_version"]
15557    pub mavlink_version: u8,
15558}
15559impl HEARTBEAT_DATA {
15560    pub const ENCODED_LEN: usize = 9usize;
15561    pub const DEFAULT: Self = Self {
15562        custom_mode: 0_u32,
15563        mavtype: MavType::DEFAULT,
15564        autopilot: MavAutopilot::DEFAULT,
15565        base_mode: MavModeFlag::DEFAULT,
15566        system_status: MavState::DEFAULT,
15567        mavlink_version: MINOR_MAVLINK_VERSION,
15568    };
15569    #[cfg(feature = "arbitrary")]
15570    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15571        use arbitrary::{Arbitrary, Unstructured};
15572        let mut buf = [0u8; 1024];
15573        rng.fill_bytes(&mut buf);
15574        let mut unstructured = Unstructured::new(&buf);
15575        Self::arbitrary(&mut unstructured).unwrap_or_default()
15576    }
15577}
15578impl Default for HEARTBEAT_DATA {
15579    fn default() -> Self {
15580        Self::DEFAULT.clone()
15581    }
15582}
15583impl MessageData for HEARTBEAT_DATA {
15584    type Message = MavMessage;
15585    const ID: u32 = 0u32;
15586    const NAME: &'static str = "HEARTBEAT";
15587    const EXTRA_CRC: u8 = 50u8;
15588    const ENCODED_LEN: usize = 9usize;
15589    fn deser(
15590        _version: MavlinkVersion,
15591        __input: &[u8],
15592    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15593        let avail_len = __input.len();
15594        let mut payload_buf = [0; Self::ENCODED_LEN];
15595        let mut buf = if avail_len < Self::ENCODED_LEN {
15596            payload_buf[0..avail_len].copy_from_slice(__input);
15597            Bytes::new(&payload_buf)
15598        } else {
15599            Bytes::new(__input)
15600        };
15601        let mut __struct = Self::default();
15602        __struct.custom_mode = buf.get_u32_le();
15603        let tmp = buf.get_u8();
15604        __struct.mavtype =
15605            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15606                enum_type: "MavType",
15607                value: tmp as u32,
15608            })?;
15609        let tmp = buf.get_u8();
15610        __struct.autopilot =
15611            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15612                enum_type: "MavAutopilot",
15613                value: tmp as u32,
15614            })?;
15615        let tmp = buf.get_u8();
15616        __struct.base_mode = MavModeFlag::from_bits(tmp & MavModeFlag::all().bits()).ok_or(
15617            ::mavlink_core::error::ParserError::InvalidFlag {
15618                flag_type: "MavModeFlag",
15619                value: tmp as u32,
15620            },
15621        )?;
15622        let tmp = buf.get_u8();
15623        __struct.system_status =
15624            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15625                enum_type: "MavState",
15626                value: tmp as u32,
15627            })?;
15628        __struct.mavlink_version = buf.get_u8();
15629        Ok(__struct)
15630    }
15631    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15632        let mut __tmp = BytesMut::new(bytes);
15633        #[allow(clippy::absurd_extreme_comparisons)]
15634        #[allow(unused_comparisons)]
15635        if __tmp.remaining() < Self::ENCODED_LEN {
15636            panic!(
15637                "buffer is too small (need {} bytes, but got {})",
15638                Self::ENCODED_LEN,
15639                __tmp.remaining(),
15640            )
15641        }
15642        __tmp.put_u32_le(self.custom_mode);
15643        __tmp.put_u8(self.mavtype as u8);
15644        __tmp.put_u8(self.autopilot as u8);
15645        __tmp.put_u8(self.base_mode.bits());
15646        __tmp.put_u8(self.system_status as u8);
15647        __tmp.put_u8(self.mavlink_version);
15648        if matches!(version, MavlinkVersion::V2) {
15649            let len = __tmp.len();
15650            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15651        } else {
15652            __tmp.len()
15653        }
15654    }
15655}
15656#[doc = "The IMU readings in SI units in NED body frame."]
15657#[doc = ""]
15658#[doc = "ID: 105"]
15659#[derive(Debug, Clone, PartialEq)]
15660#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15661#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15662pub struct HIGHRES_IMU_DATA {
15663    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
15664    pub time_usec: u64,
15665    #[doc = "X acceleration"]
15666    pub xacc: f32,
15667    #[doc = "Y acceleration"]
15668    pub yacc: f32,
15669    #[doc = "Z acceleration"]
15670    pub zacc: f32,
15671    #[doc = "Angular speed around X axis"]
15672    pub xgyro: f32,
15673    #[doc = "Angular speed around Y axis"]
15674    pub ygyro: f32,
15675    #[doc = "Angular speed around Z axis"]
15676    pub zgyro: f32,
15677    #[doc = "X Magnetic field"]
15678    pub xmag: f32,
15679    #[doc = "Y Magnetic field"]
15680    pub ymag: f32,
15681    #[doc = "Z Magnetic field"]
15682    pub zmag: f32,
15683    #[doc = "Absolute pressure"]
15684    pub abs_pressure: f32,
15685    #[doc = "Differential pressure"]
15686    pub diff_pressure: f32,
15687    #[doc = "Altitude calculated from pressure"]
15688    pub pressure_alt: f32,
15689    #[doc = "Temperature"]
15690    pub temperature: f32,
15691    #[doc = "Bitmap for fields that have updated since last message"]
15692    pub fields_updated: HighresImuUpdatedFlags,
15693    #[doc = "Id. Ids are numbered from 0 and map to IMUs numbered from 1 (e.g. IMU1 will have a message with id=0)"]
15694    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
15695    pub id: u8,
15696}
15697impl HIGHRES_IMU_DATA {
15698    pub const ENCODED_LEN: usize = 63usize;
15699    pub const DEFAULT: Self = Self {
15700        time_usec: 0_u64,
15701        xacc: 0.0_f32,
15702        yacc: 0.0_f32,
15703        zacc: 0.0_f32,
15704        xgyro: 0.0_f32,
15705        ygyro: 0.0_f32,
15706        zgyro: 0.0_f32,
15707        xmag: 0.0_f32,
15708        ymag: 0.0_f32,
15709        zmag: 0.0_f32,
15710        abs_pressure: 0.0_f32,
15711        diff_pressure: 0.0_f32,
15712        pressure_alt: 0.0_f32,
15713        temperature: 0.0_f32,
15714        fields_updated: HighresImuUpdatedFlags::DEFAULT,
15715        id: 0_u8,
15716    };
15717    #[cfg(feature = "arbitrary")]
15718    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15719        use arbitrary::{Arbitrary, Unstructured};
15720        let mut buf = [0u8; 1024];
15721        rng.fill_bytes(&mut buf);
15722        let mut unstructured = Unstructured::new(&buf);
15723        Self::arbitrary(&mut unstructured).unwrap_or_default()
15724    }
15725}
15726impl Default for HIGHRES_IMU_DATA {
15727    fn default() -> Self {
15728        Self::DEFAULT.clone()
15729    }
15730}
15731impl MessageData for HIGHRES_IMU_DATA {
15732    type Message = MavMessage;
15733    const ID: u32 = 105u32;
15734    const NAME: &'static str = "HIGHRES_IMU";
15735    const EXTRA_CRC: u8 = 93u8;
15736    const ENCODED_LEN: usize = 63usize;
15737    fn deser(
15738        _version: MavlinkVersion,
15739        __input: &[u8],
15740    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15741        let avail_len = __input.len();
15742        let mut payload_buf = [0; Self::ENCODED_LEN];
15743        let mut buf = if avail_len < Self::ENCODED_LEN {
15744            payload_buf[0..avail_len].copy_from_slice(__input);
15745            Bytes::new(&payload_buf)
15746        } else {
15747            Bytes::new(__input)
15748        };
15749        let mut __struct = Self::default();
15750        __struct.time_usec = buf.get_u64_le();
15751        __struct.xacc = buf.get_f32_le();
15752        __struct.yacc = buf.get_f32_le();
15753        __struct.zacc = buf.get_f32_le();
15754        __struct.xgyro = buf.get_f32_le();
15755        __struct.ygyro = buf.get_f32_le();
15756        __struct.zgyro = buf.get_f32_le();
15757        __struct.xmag = buf.get_f32_le();
15758        __struct.ymag = buf.get_f32_le();
15759        __struct.zmag = buf.get_f32_le();
15760        __struct.abs_pressure = buf.get_f32_le();
15761        __struct.diff_pressure = buf.get_f32_le();
15762        __struct.pressure_alt = buf.get_f32_le();
15763        __struct.temperature = buf.get_f32_le();
15764        let tmp = buf.get_u16_le();
15765        __struct.fields_updated = HighresImuUpdatedFlags::from_bits(
15766            tmp & HighresImuUpdatedFlags::all().bits(),
15767        )
15768        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
15769            flag_type: "HighresImuUpdatedFlags",
15770            value: tmp as u32,
15771        })?;
15772        __struct.id = buf.get_u8();
15773        Ok(__struct)
15774    }
15775    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15776        let mut __tmp = BytesMut::new(bytes);
15777        #[allow(clippy::absurd_extreme_comparisons)]
15778        #[allow(unused_comparisons)]
15779        if __tmp.remaining() < Self::ENCODED_LEN {
15780            panic!(
15781                "buffer is too small (need {} bytes, but got {})",
15782                Self::ENCODED_LEN,
15783                __tmp.remaining(),
15784            )
15785        }
15786        __tmp.put_u64_le(self.time_usec);
15787        __tmp.put_f32_le(self.xacc);
15788        __tmp.put_f32_le(self.yacc);
15789        __tmp.put_f32_le(self.zacc);
15790        __tmp.put_f32_le(self.xgyro);
15791        __tmp.put_f32_le(self.ygyro);
15792        __tmp.put_f32_le(self.zgyro);
15793        __tmp.put_f32_le(self.xmag);
15794        __tmp.put_f32_le(self.ymag);
15795        __tmp.put_f32_le(self.zmag);
15796        __tmp.put_f32_le(self.abs_pressure);
15797        __tmp.put_f32_le(self.diff_pressure);
15798        __tmp.put_f32_le(self.pressure_alt);
15799        __tmp.put_f32_le(self.temperature);
15800        __tmp.put_u16_le(self.fields_updated.bits());
15801        if matches!(version, MavlinkVersion::V2) {
15802            __tmp.put_u8(self.id);
15803            let len = __tmp.len();
15804            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15805        } else {
15806            __tmp.len()
15807        }
15808    }
15809}
15810#[deprecated = " See `HIGH_LATENCY2` (Deprecated since 2020-10)"]
15811#[doc = "Message appropriate for high latency connections like Iridium."]
15812#[doc = ""]
15813#[doc = "ID: 234"]
15814#[derive(Debug, Clone, PartialEq)]
15815#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15816#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15817pub struct HIGH_LATENCY_DATA {
15818    #[doc = "A bitfield for use for autopilot-specific flags."]
15819    pub custom_mode: u32,
15820    #[doc = "Latitude"]
15821    pub latitude: i32,
15822    #[doc = "Longitude"]
15823    pub longitude: i32,
15824    #[doc = "roll"]
15825    pub roll: i16,
15826    #[doc = "pitch"]
15827    pub pitch: i16,
15828    #[doc = "heading"]
15829    pub heading: u16,
15830    #[doc = "heading setpoint"]
15831    pub heading_sp: i16,
15832    #[doc = "Altitude above mean sea level"]
15833    pub altitude_amsl: i16,
15834    #[doc = "Altitude setpoint relative to the home position"]
15835    pub altitude_sp: i16,
15836    #[doc = "distance to target"]
15837    pub wp_distance: u16,
15838    #[doc = "Bitmap of enabled system modes."]
15839    pub base_mode: MavModeFlag,
15840    #[doc = "The landed state. Is set to MAV_LANDED_STATE_UNDEFINED if landed state is unknown."]
15841    pub landed_state: MavLandedState,
15842    #[doc = "throttle (percentage)"]
15843    pub throttle: i8,
15844    #[doc = "airspeed"]
15845    pub airspeed: u8,
15846    #[doc = "airspeed setpoint"]
15847    pub airspeed_sp: u8,
15848    #[doc = "groundspeed"]
15849    pub groundspeed: u8,
15850    #[doc = "climb rate"]
15851    pub climb_rate: i8,
15852    #[doc = "Number of satellites visible. If unknown, set to UINT8_MAX"]
15853    pub gps_nsat: u8,
15854    #[doc = "GPS Fix type."]
15855    pub gps_fix_type: GpsFixType,
15856    #[doc = "Remaining battery (percentage)"]
15857    pub battery_remaining: u8,
15858    #[doc = "Autopilot temperature (degrees C)"]
15859    pub temperature: i8,
15860    #[doc = "Air temperature (degrees C) from airspeed sensor"]
15861    pub temperature_air: i8,
15862    #[doc = "failsafe (each bit represents a failsafe where 0=ok, 1=failsafe active (bit0:RC, bit1:batt, bit2:GPS, bit3:GCS, bit4:fence)"]
15863    pub failsafe: u8,
15864    #[doc = "current waypoint number"]
15865    pub wp_num: u8,
15866}
15867impl HIGH_LATENCY_DATA {
15868    pub const ENCODED_LEN: usize = 40usize;
15869    pub const DEFAULT: Self = Self {
15870        custom_mode: 0_u32,
15871        latitude: 0_i32,
15872        longitude: 0_i32,
15873        roll: 0_i16,
15874        pitch: 0_i16,
15875        heading: 0_u16,
15876        heading_sp: 0_i16,
15877        altitude_amsl: 0_i16,
15878        altitude_sp: 0_i16,
15879        wp_distance: 0_u16,
15880        base_mode: MavModeFlag::DEFAULT,
15881        landed_state: MavLandedState::DEFAULT,
15882        throttle: 0_i8,
15883        airspeed: 0_u8,
15884        airspeed_sp: 0_u8,
15885        groundspeed: 0_u8,
15886        climb_rate: 0_i8,
15887        gps_nsat: 0_u8,
15888        gps_fix_type: GpsFixType::DEFAULT,
15889        battery_remaining: 0_u8,
15890        temperature: 0_i8,
15891        temperature_air: 0_i8,
15892        failsafe: 0_u8,
15893        wp_num: 0_u8,
15894    };
15895    #[cfg(feature = "arbitrary")]
15896    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15897        use arbitrary::{Arbitrary, Unstructured};
15898        let mut buf = [0u8; 1024];
15899        rng.fill_bytes(&mut buf);
15900        let mut unstructured = Unstructured::new(&buf);
15901        Self::arbitrary(&mut unstructured).unwrap_or_default()
15902    }
15903}
15904impl Default for HIGH_LATENCY_DATA {
15905    fn default() -> Self {
15906        Self::DEFAULT.clone()
15907    }
15908}
15909impl MessageData for HIGH_LATENCY_DATA {
15910    type Message = MavMessage;
15911    const ID: u32 = 234u32;
15912    const NAME: &'static str = "HIGH_LATENCY";
15913    const EXTRA_CRC: u8 = 150u8;
15914    const ENCODED_LEN: usize = 40usize;
15915    fn deser(
15916        _version: MavlinkVersion,
15917        __input: &[u8],
15918    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15919        let avail_len = __input.len();
15920        let mut payload_buf = [0; Self::ENCODED_LEN];
15921        let mut buf = if avail_len < Self::ENCODED_LEN {
15922            payload_buf[0..avail_len].copy_from_slice(__input);
15923            Bytes::new(&payload_buf)
15924        } else {
15925            Bytes::new(__input)
15926        };
15927        let mut __struct = Self::default();
15928        __struct.custom_mode = buf.get_u32_le();
15929        __struct.latitude = buf.get_i32_le();
15930        __struct.longitude = buf.get_i32_le();
15931        __struct.roll = buf.get_i16_le();
15932        __struct.pitch = buf.get_i16_le();
15933        __struct.heading = buf.get_u16_le();
15934        __struct.heading_sp = buf.get_i16_le();
15935        __struct.altitude_amsl = buf.get_i16_le();
15936        __struct.altitude_sp = buf.get_i16_le();
15937        __struct.wp_distance = buf.get_u16_le();
15938        let tmp = buf.get_u8();
15939        __struct.base_mode = MavModeFlag::from_bits(tmp & MavModeFlag::all().bits()).ok_or(
15940            ::mavlink_core::error::ParserError::InvalidFlag {
15941                flag_type: "MavModeFlag",
15942                value: tmp as u32,
15943            },
15944        )?;
15945        let tmp = buf.get_u8();
15946        __struct.landed_state =
15947            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15948                enum_type: "MavLandedState",
15949                value: tmp as u32,
15950            })?;
15951        __struct.throttle = buf.get_i8();
15952        __struct.airspeed = buf.get_u8();
15953        __struct.airspeed_sp = buf.get_u8();
15954        __struct.groundspeed = buf.get_u8();
15955        __struct.climb_rate = buf.get_i8();
15956        __struct.gps_nsat = buf.get_u8();
15957        let tmp = buf.get_u8();
15958        __struct.gps_fix_type =
15959            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15960                enum_type: "GpsFixType",
15961                value: tmp as u32,
15962            })?;
15963        __struct.battery_remaining = buf.get_u8();
15964        __struct.temperature = buf.get_i8();
15965        __struct.temperature_air = buf.get_i8();
15966        __struct.failsafe = buf.get_u8();
15967        __struct.wp_num = buf.get_u8();
15968        Ok(__struct)
15969    }
15970    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15971        let mut __tmp = BytesMut::new(bytes);
15972        #[allow(clippy::absurd_extreme_comparisons)]
15973        #[allow(unused_comparisons)]
15974        if __tmp.remaining() < Self::ENCODED_LEN {
15975            panic!(
15976                "buffer is too small (need {} bytes, but got {})",
15977                Self::ENCODED_LEN,
15978                __tmp.remaining(),
15979            )
15980        }
15981        __tmp.put_u32_le(self.custom_mode);
15982        __tmp.put_i32_le(self.latitude);
15983        __tmp.put_i32_le(self.longitude);
15984        __tmp.put_i16_le(self.roll);
15985        __tmp.put_i16_le(self.pitch);
15986        __tmp.put_u16_le(self.heading);
15987        __tmp.put_i16_le(self.heading_sp);
15988        __tmp.put_i16_le(self.altitude_amsl);
15989        __tmp.put_i16_le(self.altitude_sp);
15990        __tmp.put_u16_le(self.wp_distance);
15991        __tmp.put_u8(self.base_mode.bits());
15992        __tmp.put_u8(self.landed_state as u8);
15993        __tmp.put_i8(self.throttle);
15994        __tmp.put_u8(self.airspeed);
15995        __tmp.put_u8(self.airspeed_sp);
15996        __tmp.put_u8(self.groundspeed);
15997        __tmp.put_i8(self.climb_rate);
15998        __tmp.put_u8(self.gps_nsat);
15999        __tmp.put_u8(self.gps_fix_type as u8);
16000        __tmp.put_u8(self.battery_remaining);
16001        __tmp.put_i8(self.temperature);
16002        __tmp.put_i8(self.temperature_air);
16003        __tmp.put_u8(self.failsafe);
16004        __tmp.put_u8(self.wp_num);
16005        if matches!(version, MavlinkVersion::V2) {
16006            let len = __tmp.len();
16007            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16008        } else {
16009            __tmp.len()
16010        }
16011    }
16012}
16013#[doc = "Message appropriate for high latency connections like Iridium (version 2)."]
16014#[doc = ""]
16015#[doc = "ID: 235"]
16016#[derive(Debug, Clone, PartialEq)]
16017#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16018#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16019pub struct HIGH_LATENCY2_DATA {
16020    #[doc = "Timestamp (milliseconds since boot or Unix epoch)"]
16021    pub timestamp: u32,
16022    #[doc = "Latitude"]
16023    pub latitude: i32,
16024    #[doc = "Longitude"]
16025    pub longitude: i32,
16026    #[doc = "A bitfield for use for autopilot-specific flags (2 byte version)."]
16027    pub custom_mode: u16,
16028    #[doc = "Altitude above mean sea level"]
16029    pub altitude: i16,
16030    #[doc = "Altitude setpoint"]
16031    pub target_altitude: i16,
16032    #[doc = "Distance to target waypoint or position"]
16033    pub target_distance: u16,
16034    #[doc = "Current waypoint number"]
16035    pub wp_num: u16,
16036    #[doc = "Bitmap of failure flags."]
16037    pub failure_flags: HlFailureFlag,
16038    #[doc = "Type of the MAV (quadrotor, helicopter, etc.)"]
16039    pub mavtype: MavType,
16040    #[doc = "Autopilot type / class. Use MAV_AUTOPILOT_INVALID for components that are not flight controllers."]
16041    pub autopilot: MavAutopilot,
16042    #[doc = "Heading"]
16043    pub heading: u8,
16044    #[doc = "Heading setpoint"]
16045    pub target_heading: u8,
16046    #[doc = "Throttle"]
16047    pub throttle: u8,
16048    #[doc = "Airspeed"]
16049    pub airspeed: u8,
16050    #[doc = "Airspeed setpoint"]
16051    pub airspeed_sp: u8,
16052    #[doc = "Groundspeed"]
16053    pub groundspeed: u8,
16054    #[doc = "Windspeed"]
16055    pub windspeed: u8,
16056    #[doc = "Wind heading"]
16057    pub wind_heading: u8,
16058    #[doc = "Maximum error horizontal position since last message"]
16059    pub eph: u8,
16060    #[doc = "Maximum error vertical position since last message"]
16061    pub epv: u8,
16062    #[doc = "Air temperature"]
16063    pub temperature_air: i8,
16064    #[doc = "Maximum climb rate magnitude since last message"]
16065    pub climb_rate: i8,
16066    #[doc = "Battery level (-1 if field not provided)."]
16067    pub battery: i8,
16068    #[doc = "Field for custom payload."]
16069    pub custom0: i8,
16070    #[doc = "Field for custom payload."]
16071    pub custom1: i8,
16072    #[doc = "Field for custom payload."]
16073    pub custom2: i8,
16074}
16075impl HIGH_LATENCY2_DATA {
16076    pub const ENCODED_LEN: usize = 42usize;
16077    pub const DEFAULT: Self = Self {
16078        timestamp: 0_u32,
16079        latitude: 0_i32,
16080        longitude: 0_i32,
16081        custom_mode: 0_u16,
16082        altitude: 0_i16,
16083        target_altitude: 0_i16,
16084        target_distance: 0_u16,
16085        wp_num: 0_u16,
16086        failure_flags: HlFailureFlag::DEFAULT,
16087        mavtype: MavType::DEFAULT,
16088        autopilot: MavAutopilot::DEFAULT,
16089        heading: 0_u8,
16090        target_heading: 0_u8,
16091        throttle: 0_u8,
16092        airspeed: 0_u8,
16093        airspeed_sp: 0_u8,
16094        groundspeed: 0_u8,
16095        windspeed: 0_u8,
16096        wind_heading: 0_u8,
16097        eph: 0_u8,
16098        epv: 0_u8,
16099        temperature_air: 0_i8,
16100        climb_rate: 0_i8,
16101        battery: 0_i8,
16102        custom0: 0_i8,
16103        custom1: 0_i8,
16104        custom2: 0_i8,
16105    };
16106    #[cfg(feature = "arbitrary")]
16107    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16108        use arbitrary::{Arbitrary, Unstructured};
16109        let mut buf = [0u8; 1024];
16110        rng.fill_bytes(&mut buf);
16111        let mut unstructured = Unstructured::new(&buf);
16112        Self::arbitrary(&mut unstructured).unwrap_or_default()
16113    }
16114}
16115impl Default for HIGH_LATENCY2_DATA {
16116    fn default() -> Self {
16117        Self::DEFAULT.clone()
16118    }
16119}
16120impl MessageData for HIGH_LATENCY2_DATA {
16121    type Message = MavMessage;
16122    const ID: u32 = 235u32;
16123    const NAME: &'static str = "HIGH_LATENCY2";
16124    const EXTRA_CRC: u8 = 179u8;
16125    const ENCODED_LEN: usize = 42usize;
16126    fn deser(
16127        _version: MavlinkVersion,
16128        __input: &[u8],
16129    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16130        let avail_len = __input.len();
16131        let mut payload_buf = [0; Self::ENCODED_LEN];
16132        let mut buf = if avail_len < Self::ENCODED_LEN {
16133            payload_buf[0..avail_len].copy_from_slice(__input);
16134            Bytes::new(&payload_buf)
16135        } else {
16136            Bytes::new(__input)
16137        };
16138        let mut __struct = Self::default();
16139        __struct.timestamp = buf.get_u32_le();
16140        __struct.latitude = buf.get_i32_le();
16141        __struct.longitude = buf.get_i32_le();
16142        __struct.custom_mode = buf.get_u16_le();
16143        __struct.altitude = buf.get_i16_le();
16144        __struct.target_altitude = buf.get_i16_le();
16145        __struct.target_distance = buf.get_u16_le();
16146        __struct.wp_num = buf.get_u16_le();
16147        let tmp = buf.get_u16_le();
16148        __struct.failure_flags = HlFailureFlag::from_bits(tmp & HlFailureFlag::all().bits())
16149            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
16150                flag_type: "HlFailureFlag",
16151                value: tmp as u32,
16152            })?;
16153        let tmp = buf.get_u8();
16154        __struct.mavtype =
16155            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
16156                enum_type: "MavType",
16157                value: tmp as u32,
16158            })?;
16159        let tmp = buf.get_u8();
16160        __struct.autopilot =
16161            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
16162                enum_type: "MavAutopilot",
16163                value: tmp as u32,
16164            })?;
16165        __struct.heading = buf.get_u8();
16166        __struct.target_heading = buf.get_u8();
16167        __struct.throttle = buf.get_u8();
16168        __struct.airspeed = buf.get_u8();
16169        __struct.airspeed_sp = buf.get_u8();
16170        __struct.groundspeed = buf.get_u8();
16171        __struct.windspeed = buf.get_u8();
16172        __struct.wind_heading = buf.get_u8();
16173        __struct.eph = buf.get_u8();
16174        __struct.epv = buf.get_u8();
16175        __struct.temperature_air = buf.get_i8();
16176        __struct.climb_rate = buf.get_i8();
16177        __struct.battery = buf.get_i8();
16178        __struct.custom0 = buf.get_i8();
16179        __struct.custom1 = buf.get_i8();
16180        __struct.custom2 = buf.get_i8();
16181        Ok(__struct)
16182    }
16183    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16184        let mut __tmp = BytesMut::new(bytes);
16185        #[allow(clippy::absurd_extreme_comparisons)]
16186        #[allow(unused_comparisons)]
16187        if __tmp.remaining() < Self::ENCODED_LEN {
16188            panic!(
16189                "buffer is too small (need {} bytes, but got {})",
16190                Self::ENCODED_LEN,
16191                __tmp.remaining(),
16192            )
16193        }
16194        __tmp.put_u32_le(self.timestamp);
16195        __tmp.put_i32_le(self.latitude);
16196        __tmp.put_i32_le(self.longitude);
16197        __tmp.put_u16_le(self.custom_mode);
16198        __tmp.put_i16_le(self.altitude);
16199        __tmp.put_i16_le(self.target_altitude);
16200        __tmp.put_u16_le(self.target_distance);
16201        __tmp.put_u16_le(self.wp_num);
16202        __tmp.put_u16_le(self.failure_flags.bits());
16203        __tmp.put_u8(self.mavtype as u8);
16204        __tmp.put_u8(self.autopilot as u8);
16205        __tmp.put_u8(self.heading);
16206        __tmp.put_u8(self.target_heading);
16207        __tmp.put_u8(self.throttle);
16208        __tmp.put_u8(self.airspeed);
16209        __tmp.put_u8(self.airspeed_sp);
16210        __tmp.put_u8(self.groundspeed);
16211        __tmp.put_u8(self.windspeed);
16212        __tmp.put_u8(self.wind_heading);
16213        __tmp.put_u8(self.eph);
16214        __tmp.put_u8(self.epv);
16215        __tmp.put_i8(self.temperature_air);
16216        __tmp.put_i8(self.climb_rate);
16217        __tmp.put_i8(self.battery);
16218        __tmp.put_i8(self.custom0);
16219        __tmp.put_i8(self.custom1);
16220        __tmp.put_i8(self.custom2);
16221        if matches!(version, MavlinkVersion::V2) {
16222            let len = __tmp.len();
16223            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16224        } else {
16225            __tmp.len()
16226        }
16227    }
16228}
16229#[doc = "Sent from autopilot to simulation. Hardware in the loop control outputs. Alternative to HIL_CONTROLS."]
16230#[doc = ""]
16231#[doc = "ID: 93"]
16232#[derive(Debug, Clone, PartialEq)]
16233#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16234#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16235pub struct HIL_ACTUATOR_CONTROLS_DATA {
16236    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16237    pub time_usec: u64,
16238    #[doc = "Flags bitmask."]
16239    pub flags: HilActuatorControlsFlags,
16240    #[doc = "Control outputs -1 .. 1. Channel assignment depends on the simulated hardware."]
16241    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
16242    pub controls: [f32; 16],
16243    #[doc = "System mode. Includes arming state."]
16244    pub mode: MavModeFlag,
16245}
16246impl HIL_ACTUATOR_CONTROLS_DATA {
16247    pub const ENCODED_LEN: usize = 81usize;
16248    pub const DEFAULT: Self = Self {
16249        time_usec: 0_u64,
16250        flags: HilActuatorControlsFlags::DEFAULT,
16251        controls: [0.0_f32; 16usize],
16252        mode: MavModeFlag::DEFAULT,
16253    };
16254    #[cfg(feature = "arbitrary")]
16255    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16256        use arbitrary::{Arbitrary, Unstructured};
16257        let mut buf = [0u8; 1024];
16258        rng.fill_bytes(&mut buf);
16259        let mut unstructured = Unstructured::new(&buf);
16260        Self::arbitrary(&mut unstructured).unwrap_or_default()
16261    }
16262}
16263impl Default for HIL_ACTUATOR_CONTROLS_DATA {
16264    fn default() -> Self {
16265        Self::DEFAULT.clone()
16266    }
16267}
16268impl MessageData for HIL_ACTUATOR_CONTROLS_DATA {
16269    type Message = MavMessage;
16270    const ID: u32 = 93u32;
16271    const NAME: &'static str = "HIL_ACTUATOR_CONTROLS";
16272    const EXTRA_CRC: u8 = 47u8;
16273    const ENCODED_LEN: usize = 81usize;
16274    fn deser(
16275        _version: MavlinkVersion,
16276        __input: &[u8],
16277    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16278        let avail_len = __input.len();
16279        let mut payload_buf = [0; Self::ENCODED_LEN];
16280        let mut buf = if avail_len < Self::ENCODED_LEN {
16281            payload_buf[0..avail_len].copy_from_slice(__input);
16282            Bytes::new(&payload_buf)
16283        } else {
16284            Bytes::new(__input)
16285        };
16286        let mut __struct = Self::default();
16287        __struct.time_usec = buf.get_u64_le();
16288        let tmp = buf.get_u64_le();
16289        __struct.flags =
16290            HilActuatorControlsFlags::from_bits(tmp & HilActuatorControlsFlags::all().bits())
16291                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
16292                    flag_type: "HilActuatorControlsFlags",
16293                    value: tmp as u32,
16294                })?;
16295        for v in &mut __struct.controls {
16296            let val = buf.get_f32_le();
16297            *v = val;
16298        }
16299        let tmp = buf.get_u8();
16300        __struct.mode = MavModeFlag::from_bits(tmp & MavModeFlag::all().bits()).ok_or(
16301            ::mavlink_core::error::ParserError::InvalidFlag {
16302                flag_type: "MavModeFlag",
16303                value: tmp as u32,
16304            },
16305        )?;
16306        Ok(__struct)
16307    }
16308    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16309        let mut __tmp = BytesMut::new(bytes);
16310        #[allow(clippy::absurd_extreme_comparisons)]
16311        #[allow(unused_comparisons)]
16312        if __tmp.remaining() < Self::ENCODED_LEN {
16313            panic!(
16314                "buffer is too small (need {} bytes, but got {})",
16315                Self::ENCODED_LEN,
16316                __tmp.remaining(),
16317            )
16318        }
16319        __tmp.put_u64_le(self.time_usec);
16320        __tmp.put_u64_le(self.flags.bits());
16321        for val in &self.controls {
16322            __tmp.put_f32_le(*val);
16323        }
16324        __tmp.put_u8(self.mode.bits());
16325        if matches!(version, MavlinkVersion::V2) {
16326            let len = __tmp.len();
16327            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16328        } else {
16329            __tmp.len()
16330        }
16331    }
16332}
16333#[doc = "Sent from autopilot to simulation. Hardware in the loop control outputs. Alternative to HIL_ACTUATOR_CONTROLS."]
16334#[doc = ""]
16335#[doc = "ID: 91"]
16336#[derive(Debug, Clone, PartialEq)]
16337#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16338#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16339pub struct HIL_CONTROLS_DATA {
16340    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16341    pub time_usec: u64,
16342    #[doc = "Control output -1 .. 1"]
16343    pub roll_ailerons: f32,
16344    #[doc = "Control output -1 .. 1"]
16345    pub pitch_elevator: f32,
16346    #[doc = "Control output -1 .. 1"]
16347    pub yaw_rudder: f32,
16348    #[doc = "Throttle 0 .. 1"]
16349    pub throttle: f32,
16350    #[doc = "Aux 1, -1 .. 1"]
16351    pub aux1: f32,
16352    #[doc = "Aux 2, -1 .. 1"]
16353    pub aux2: f32,
16354    #[doc = "Aux 3, -1 .. 1"]
16355    pub aux3: f32,
16356    #[doc = "Aux 4, -1 .. 1"]
16357    pub aux4: f32,
16358    #[doc = "System mode."]
16359    pub mode: MavMode,
16360    #[doc = "Navigation mode (MAV_NAV_MODE)"]
16361    pub nav_mode: u8,
16362}
16363impl HIL_CONTROLS_DATA {
16364    pub const ENCODED_LEN: usize = 42usize;
16365    pub const DEFAULT: Self = Self {
16366        time_usec: 0_u64,
16367        roll_ailerons: 0.0_f32,
16368        pitch_elevator: 0.0_f32,
16369        yaw_rudder: 0.0_f32,
16370        throttle: 0.0_f32,
16371        aux1: 0.0_f32,
16372        aux2: 0.0_f32,
16373        aux3: 0.0_f32,
16374        aux4: 0.0_f32,
16375        mode: MavMode::DEFAULT,
16376        nav_mode: 0_u8,
16377    };
16378    #[cfg(feature = "arbitrary")]
16379    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16380        use arbitrary::{Arbitrary, Unstructured};
16381        let mut buf = [0u8; 1024];
16382        rng.fill_bytes(&mut buf);
16383        let mut unstructured = Unstructured::new(&buf);
16384        Self::arbitrary(&mut unstructured).unwrap_or_default()
16385    }
16386}
16387impl Default for HIL_CONTROLS_DATA {
16388    fn default() -> Self {
16389        Self::DEFAULT.clone()
16390    }
16391}
16392impl MessageData for HIL_CONTROLS_DATA {
16393    type Message = MavMessage;
16394    const ID: u32 = 91u32;
16395    const NAME: &'static str = "HIL_CONTROLS";
16396    const EXTRA_CRC: u8 = 63u8;
16397    const ENCODED_LEN: usize = 42usize;
16398    fn deser(
16399        _version: MavlinkVersion,
16400        __input: &[u8],
16401    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16402        let avail_len = __input.len();
16403        let mut payload_buf = [0; Self::ENCODED_LEN];
16404        let mut buf = if avail_len < Self::ENCODED_LEN {
16405            payload_buf[0..avail_len].copy_from_slice(__input);
16406            Bytes::new(&payload_buf)
16407        } else {
16408            Bytes::new(__input)
16409        };
16410        let mut __struct = Self::default();
16411        __struct.time_usec = buf.get_u64_le();
16412        __struct.roll_ailerons = buf.get_f32_le();
16413        __struct.pitch_elevator = buf.get_f32_le();
16414        __struct.yaw_rudder = buf.get_f32_le();
16415        __struct.throttle = buf.get_f32_le();
16416        __struct.aux1 = buf.get_f32_le();
16417        __struct.aux2 = buf.get_f32_le();
16418        __struct.aux3 = buf.get_f32_le();
16419        __struct.aux4 = buf.get_f32_le();
16420        let tmp = buf.get_u8();
16421        __struct.mode =
16422            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
16423                enum_type: "MavMode",
16424                value: tmp as u32,
16425            })?;
16426        __struct.nav_mode = buf.get_u8();
16427        Ok(__struct)
16428    }
16429    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16430        let mut __tmp = BytesMut::new(bytes);
16431        #[allow(clippy::absurd_extreme_comparisons)]
16432        #[allow(unused_comparisons)]
16433        if __tmp.remaining() < Self::ENCODED_LEN {
16434            panic!(
16435                "buffer is too small (need {} bytes, but got {})",
16436                Self::ENCODED_LEN,
16437                __tmp.remaining(),
16438            )
16439        }
16440        __tmp.put_u64_le(self.time_usec);
16441        __tmp.put_f32_le(self.roll_ailerons);
16442        __tmp.put_f32_le(self.pitch_elevator);
16443        __tmp.put_f32_le(self.yaw_rudder);
16444        __tmp.put_f32_le(self.throttle);
16445        __tmp.put_f32_le(self.aux1);
16446        __tmp.put_f32_le(self.aux2);
16447        __tmp.put_f32_le(self.aux3);
16448        __tmp.put_f32_le(self.aux4);
16449        __tmp.put_u8(self.mode as u8);
16450        __tmp.put_u8(self.nav_mode);
16451        if matches!(version, MavlinkVersion::V2) {
16452            let len = __tmp.len();
16453            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16454        } else {
16455            __tmp.len()
16456        }
16457    }
16458}
16459#[doc = "The global position, as returned by the Global Positioning System (GPS). This is                  NOT the global position estimate of the system, but rather a RAW sensor value. See message GLOBAL_POSITION_INT for the global position estimate."]
16460#[doc = ""]
16461#[doc = "ID: 113"]
16462#[derive(Debug, Clone, PartialEq)]
16463#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16464#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16465pub struct HIL_GPS_DATA {
16466    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16467    pub time_usec: u64,
16468    #[doc = "Latitude (WGS84)"]
16469    pub lat: i32,
16470    #[doc = "Longitude (WGS84)"]
16471    pub lon: i32,
16472    #[doc = "Altitude (MSL). Positive for up."]
16473    pub alt: i32,
16474    #[doc = "GPS HDOP horizontal dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
16475    pub eph: u16,
16476    #[doc = "GPS VDOP vertical dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
16477    pub epv: u16,
16478    #[doc = "GPS ground speed. If unknown, set to: UINT16_MAX"]
16479    pub vel: u16,
16480    #[doc = "GPS velocity in north direction in earth-fixed NED frame"]
16481    pub vn: i16,
16482    #[doc = "GPS velocity in east direction in earth-fixed NED frame"]
16483    pub ve: i16,
16484    #[doc = "GPS velocity in down direction in earth-fixed NED frame"]
16485    pub vd: i16,
16486    #[doc = "Course over ground (NOT heading, but direction of movement), 0.0..359.99 degrees. If unknown, set to: UINT16_MAX"]
16487    pub cog: u16,
16488    #[doc = "0-1: no fix, 2: 2D fix, 3: 3D fix. Some applications will not use the value of this field unless it is at least two, so always correctly fill in the fix."]
16489    pub fix_type: u8,
16490    #[doc = "Number of satellites visible. If unknown, set to UINT8_MAX"]
16491    pub satellites_visible: u8,
16492    #[doc = "GPS ID (zero indexed). Used for multiple GPS inputs"]
16493    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
16494    pub id: u8,
16495    #[doc = "Yaw of vehicle relative to Earth's North, zero means not available, use 36000 for north"]
16496    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
16497    pub yaw: u16,
16498}
16499impl HIL_GPS_DATA {
16500    pub const ENCODED_LEN: usize = 39usize;
16501    pub const DEFAULT: Self = Self {
16502        time_usec: 0_u64,
16503        lat: 0_i32,
16504        lon: 0_i32,
16505        alt: 0_i32,
16506        eph: 0_u16,
16507        epv: 0_u16,
16508        vel: 0_u16,
16509        vn: 0_i16,
16510        ve: 0_i16,
16511        vd: 0_i16,
16512        cog: 0_u16,
16513        fix_type: 0_u8,
16514        satellites_visible: 0_u8,
16515        id: 0_u8,
16516        yaw: 0_u16,
16517    };
16518    #[cfg(feature = "arbitrary")]
16519    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16520        use arbitrary::{Arbitrary, Unstructured};
16521        let mut buf = [0u8; 1024];
16522        rng.fill_bytes(&mut buf);
16523        let mut unstructured = Unstructured::new(&buf);
16524        Self::arbitrary(&mut unstructured).unwrap_or_default()
16525    }
16526}
16527impl Default for HIL_GPS_DATA {
16528    fn default() -> Self {
16529        Self::DEFAULT.clone()
16530    }
16531}
16532impl MessageData for HIL_GPS_DATA {
16533    type Message = MavMessage;
16534    const ID: u32 = 113u32;
16535    const NAME: &'static str = "HIL_GPS";
16536    const EXTRA_CRC: u8 = 124u8;
16537    const ENCODED_LEN: usize = 39usize;
16538    fn deser(
16539        _version: MavlinkVersion,
16540        __input: &[u8],
16541    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16542        let avail_len = __input.len();
16543        let mut payload_buf = [0; Self::ENCODED_LEN];
16544        let mut buf = if avail_len < Self::ENCODED_LEN {
16545            payload_buf[0..avail_len].copy_from_slice(__input);
16546            Bytes::new(&payload_buf)
16547        } else {
16548            Bytes::new(__input)
16549        };
16550        let mut __struct = Self::default();
16551        __struct.time_usec = buf.get_u64_le();
16552        __struct.lat = buf.get_i32_le();
16553        __struct.lon = buf.get_i32_le();
16554        __struct.alt = buf.get_i32_le();
16555        __struct.eph = buf.get_u16_le();
16556        __struct.epv = buf.get_u16_le();
16557        __struct.vel = buf.get_u16_le();
16558        __struct.vn = buf.get_i16_le();
16559        __struct.ve = buf.get_i16_le();
16560        __struct.vd = buf.get_i16_le();
16561        __struct.cog = buf.get_u16_le();
16562        __struct.fix_type = buf.get_u8();
16563        __struct.satellites_visible = buf.get_u8();
16564        __struct.id = buf.get_u8();
16565        __struct.yaw = buf.get_u16_le();
16566        Ok(__struct)
16567    }
16568    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16569        let mut __tmp = BytesMut::new(bytes);
16570        #[allow(clippy::absurd_extreme_comparisons)]
16571        #[allow(unused_comparisons)]
16572        if __tmp.remaining() < Self::ENCODED_LEN {
16573            panic!(
16574                "buffer is too small (need {} bytes, but got {})",
16575                Self::ENCODED_LEN,
16576                __tmp.remaining(),
16577            )
16578        }
16579        __tmp.put_u64_le(self.time_usec);
16580        __tmp.put_i32_le(self.lat);
16581        __tmp.put_i32_le(self.lon);
16582        __tmp.put_i32_le(self.alt);
16583        __tmp.put_u16_le(self.eph);
16584        __tmp.put_u16_le(self.epv);
16585        __tmp.put_u16_le(self.vel);
16586        __tmp.put_i16_le(self.vn);
16587        __tmp.put_i16_le(self.ve);
16588        __tmp.put_i16_le(self.vd);
16589        __tmp.put_u16_le(self.cog);
16590        __tmp.put_u8(self.fix_type);
16591        __tmp.put_u8(self.satellites_visible);
16592        if matches!(version, MavlinkVersion::V2) {
16593            __tmp.put_u8(self.id);
16594            __tmp.put_u16_le(self.yaw);
16595            let len = __tmp.len();
16596            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16597        } else {
16598            __tmp.len()
16599        }
16600    }
16601}
16602#[doc = "Simulated optical flow from a flow sensor (e.g. PX4FLOW or optical mouse sensor)."]
16603#[doc = ""]
16604#[doc = "ID: 114"]
16605#[derive(Debug, Clone, PartialEq)]
16606#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16607#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16608pub struct HIL_OPTICAL_FLOW_DATA {
16609    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16610    pub time_usec: u64,
16611    #[doc = "Integration time. Divide integrated_x and integrated_y by the integration time to obtain average flow. The integration time also indicates the."]
16612    pub integration_time_us: u32,
16613    #[doc = "Flow in radians around X axis (Sensor RH rotation about the X axis induces a positive flow. Sensor linear motion along the positive Y axis induces a negative flow.)"]
16614    pub integrated_x: f32,
16615    #[doc = "Flow in radians around Y axis (Sensor RH rotation about the Y axis induces a positive flow. Sensor linear motion along the positive X axis induces a positive flow.)"]
16616    pub integrated_y: f32,
16617    #[doc = "RH rotation around X axis"]
16618    pub integrated_xgyro: f32,
16619    #[doc = "RH rotation around Y axis"]
16620    pub integrated_ygyro: f32,
16621    #[doc = "RH rotation around Z axis"]
16622    pub integrated_zgyro: f32,
16623    #[doc = "Time since the distance was sampled."]
16624    pub time_delta_distance_us: u32,
16625    #[doc = "Distance to the center of the flow field. Positive value (including zero): distance known. Negative value: Unknown distance."]
16626    pub distance: f32,
16627    #[doc = "Temperature"]
16628    pub temperature: i16,
16629    #[doc = "Sensor ID"]
16630    pub sensor_id: u8,
16631    #[doc = "Optical flow quality / confidence. 0: no valid flow, 255: maximum quality"]
16632    pub quality: u8,
16633}
16634impl HIL_OPTICAL_FLOW_DATA {
16635    pub const ENCODED_LEN: usize = 44usize;
16636    pub const DEFAULT: Self = Self {
16637        time_usec: 0_u64,
16638        integration_time_us: 0_u32,
16639        integrated_x: 0.0_f32,
16640        integrated_y: 0.0_f32,
16641        integrated_xgyro: 0.0_f32,
16642        integrated_ygyro: 0.0_f32,
16643        integrated_zgyro: 0.0_f32,
16644        time_delta_distance_us: 0_u32,
16645        distance: 0.0_f32,
16646        temperature: 0_i16,
16647        sensor_id: 0_u8,
16648        quality: 0_u8,
16649    };
16650    #[cfg(feature = "arbitrary")]
16651    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16652        use arbitrary::{Arbitrary, Unstructured};
16653        let mut buf = [0u8; 1024];
16654        rng.fill_bytes(&mut buf);
16655        let mut unstructured = Unstructured::new(&buf);
16656        Self::arbitrary(&mut unstructured).unwrap_or_default()
16657    }
16658}
16659impl Default for HIL_OPTICAL_FLOW_DATA {
16660    fn default() -> Self {
16661        Self::DEFAULT.clone()
16662    }
16663}
16664impl MessageData for HIL_OPTICAL_FLOW_DATA {
16665    type Message = MavMessage;
16666    const ID: u32 = 114u32;
16667    const NAME: &'static str = "HIL_OPTICAL_FLOW";
16668    const EXTRA_CRC: u8 = 237u8;
16669    const ENCODED_LEN: usize = 44usize;
16670    fn deser(
16671        _version: MavlinkVersion,
16672        __input: &[u8],
16673    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16674        let avail_len = __input.len();
16675        let mut payload_buf = [0; Self::ENCODED_LEN];
16676        let mut buf = if avail_len < Self::ENCODED_LEN {
16677            payload_buf[0..avail_len].copy_from_slice(__input);
16678            Bytes::new(&payload_buf)
16679        } else {
16680            Bytes::new(__input)
16681        };
16682        let mut __struct = Self::default();
16683        __struct.time_usec = buf.get_u64_le();
16684        __struct.integration_time_us = buf.get_u32_le();
16685        __struct.integrated_x = buf.get_f32_le();
16686        __struct.integrated_y = buf.get_f32_le();
16687        __struct.integrated_xgyro = buf.get_f32_le();
16688        __struct.integrated_ygyro = buf.get_f32_le();
16689        __struct.integrated_zgyro = buf.get_f32_le();
16690        __struct.time_delta_distance_us = buf.get_u32_le();
16691        __struct.distance = buf.get_f32_le();
16692        __struct.temperature = buf.get_i16_le();
16693        __struct.sensor_id = buf.get_u8();
16694        __struct.quality = buf.get_u8();
16695        Ok(__struct)
16696    }
16697    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16698        let mut __tmp = BytesMut::new(bytes);
16699        #[allow(clippy::absurd_extreme_comparisons)]
16700        #[allow(unused_comparisons)]
16701        if __tmp.remaining() < Self::ENCODED_LEN {
16702            panic!(
16703                "buffer is too small (need {} bytes, but got {})",
16704                Self::ENCODED_LEN,
16705                __tmp.remaining(),
16706            )
16707        }
16708        __tmp.put_u64_le(self.time_usec);
16709        __tmp.put_u32_le(self.integration_time_us);
16710        __tmp.put_f32_le(self.integrated_x);
16711        __tmp.put_f32_le(self.integrated_y);
16712        __tmp.put_f32_le(self.integrated_xgyro);
16713        __tmp.put_f32_le(self.integrated_ygyro);
16714        __tmp.put_f32_le(self.integrated_zgyro);
16715        __tmp.put_u32_le(self.time_delta_distance_us);
16716        __tmp.put_f32_le(self.distance);
16717        __tmp.put_i16_le(self.temperature);
16718        __tmp.put_u8(self.sensor_id);
16719        __tmp.put_u8(self.quality);
16720        if matches!(version, MavlinkVersion::V2) {
16721            let len = __tmp.len();
16722            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16723        } else {
16724            __tmp.len()
16725        }
16726    }
16727}
16728#[doc = "Sent from simulation to autopilot. The RAW values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. Individual receivers/transmitters might violate this specification."]
16729#[doc = ""]
16730#[doc = "ID: 92"]
16731#[derive(Debug, Clone, PartialEq)]
16732#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16733#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16734pub struct HIL_RC_INPUTS_RAW_DATA {
16735    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16736    pub time_usec: u64,
16737    #[doc = "RC channel 1 value"]
16738    pub chan1_raw: u16,
16739    #[doc = "RC channel 2 value"]
16740    pub chan2_raw: u16,
16741    #[doc = "RC channel 3 value"]
16742    pub chan3_raw: u16,
16743    #[doc = "RC channel 4 value"]
16744    pub chan4_raw: u16,
16745    #[doc = "RC channel 5 value"]
16746    pub chan5_raw: u16,
16747    #[doc = "RC channel 6 value"]
16748    pub chan6_raw: u16,
16749    #[doc = "RC channel 7 value"]
16750    pub chan7_raw: u16,
16751    #[doc = "RC channel 8 value"]
16752    pub chan8_raw: u16,
16753    #[doc = "RC channel 9 value"]
16754    pub chan9_raw: u16,
16755    #[doc = "RC channel 10 value"]
16756    pub chan10_raw: u16,
16757    #[doc = "RC channel 11 value"]
16758    pub chan11_raw: u16,
16759    #[doc = "RC channel 12 value"]
16760    pub chan12_raw: u16,
16761    #[doc = "Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
16762    pub rssi: u8,
16763}
16764impl HIL_RC_INPUTS_RAW_DATA {
16765    pub const ENCODED_LEN: usize = 33usize;
16766    pub const DEFAULT: Self = Self {
16767        time_usec: 0_u64,
16768        chan1_raw: 0_u16,
16769        chan2_raw: 0_u16,
16770        chan3_raw: 0_u16,
16771        chan4_raw: 0_u16,
16772        chan5_raw: 0_u16,
16773        chan6_raw: 0_u16,
16774        chan7_raw: 0_u16,
16775        chan8_raw: 0_u16,
16776        chan9_raw: 0_u16,
16777        chan10_raw: 0_u16,
16778        chan11_raw: 0_u16,
16779        chan12_raw: 0_u16,
16780        rssi: 0_u8,
16781    };
16782    #[cfg(feature = "arbitrary")]
16783    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16784        use arbitrary::{Arbitrary, Unstructured};
16785        let mut buf = [0u8; 1024];
16786        rng.fill_bytes(&mut buf);
16787        let mut unstructured = Unstructured::new(&buf);
16788        Self::arbitrary(&mut unstructured).unwrap_or_default()
16789    }
16790}
16791impl Default for HIL_RC_INPUTS_RAW_DATA {
16792    fn default() -> Self {
16793        Self::DEFAULT.clone()
16794    }
16795}
16796impl MessageData for HIL_RC_INPUTS_RAW_DATA {
16797    type Message = MavMessage;
16798    const ID: u32 = 92u32;
16799    const NAME: &'static str = "HIL_RC_INPUTS_RAW";
16800    const EXTRA_CRC: u8 = 54u8;
16801    const ENCODED_LEN: usize = 33usize;
16802    fn deser(
16803        _version: MavlinkVersion,
16804        __input: &[u8],
16805    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16806        let avail_len = __input.len();
16807        let mut payload_buf = [0; Self::ENCODED_LEN];
16808        let mut buf = if avail_len < Self::ENCODED_LEN {
16809            payload_buf[0..avail_len].copy_from_slice(__input);
16810            Bytes::new(&payload_buf)
16811        } else {
16812            Bytes::new(__input)
16813        };
16814        let mut __struct = Self::default();
16815        __struct.time_usec = buf.get_u64_le();
16816        __struct.chan1_raw = buf.get_u16_le();
16817        __struct.chan2_raw = buf.get_u16_le();
16818        __struct.chan3_raw = buf.get_u16_le();
16819        __struct.chan4_raw = buf.get_u16_le();
16820        __struct.chan5_raw = buf.get_u16_le();
16821        __struct.chan6_raw = buf.get_u16_le();
16822        __struct.chan7_raw = buf.get_u16_le();
16823        __struct.chan8_raw = buf.get_u16_le();
16824        __struct.chan9_raw = buf.get_u16_le();
16825        __struct.chan10_raw = buf.get_u16_le();
16826        __struct.chan11_raw = buf.get_u16_le();
16827        __struct.chan12_raw = buf.get_u16_le();
16828        __struct.rssi = buf.get_u8();
16829        Ok(__struct)
16830    }
16831    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16832        let mut __tmp = BytesMut::new(bytes);
16833        #[allow(clippy::absurd_extreme_comparisons)]
16834        #[allow(unused_comparisons)]
16835        if __tmp.remaining() < Self::ENCODED_LEN {
16836            panic!(
16837                "buffer is too small (need {} bytes, but got {})",
16838                Self::ENCODED_LEN,
16839                __tmp.remaining(),
16840            )
16841        }
16842        __tmp.put_u64_le(self.time_usec);
16843        __tmp.put_u16_le(self.chan1_raw);
16844        __tmp.put_u16_le(self.chan2_raw);
16845        __tmp.put_u16_le(self.chan3_raw);
16846        __tmp.put_u16_le(self.chan4_raw);
16847        __tmp.put_u16_le(self.chan5_raw);
16848        __tmp.put_u16_le(self.chan6_raw);
16849        __tmp.put_u16_le(self.chan7_raw);
16850        __tmp.put_u16_le(self.chan8_raw);
16851        __tmp.put_u16_le(self.chan9_raw);
16852        __tmp.put_u16_le(self.chan10_raw);
16853        __tmp.put_u16_le(self.chan11_raw);
16854        __tmp.put_u16_le(self.chan12_raw);
16855        __tmp.put_u8(self.rssi);
16856        if matches!(version, MavlinkVersion::V2) {
16857            let len = __tmp.len();
16858            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16859        } else {
16860            __tmp.len()
16861        }
16862    }
16863}
16864#[doc = "The IMU readings in SI units in NED body frame."]
16865#[doc = ""]
16866#[doc = "ID: 107"]
16867#[derive(Debug, Clone, PartialEq)]
16868#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16869#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16870pub struct HIL_SENSOR_DATA {
16871    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16872    pub time_usec: u64,
16873    #[doc = "X acceleration"]
16874    pub xacc: f32,
16875    #[doc = "Y acceleration"]
16876    pub yacc: f32,
16877    #[doc = "Z acceleration"]
16878    pub zacc: f32,
16879    #[doc = "Angular speed around X axis in body frame"]
16880    pub xgyro: f32,
16881    #[doc = "Angular speed around Y axis in body frame"]
16882    pub ygyro: f32,
16883    #[doc = "Angular speed around Z axis in body frame"]
16884    pub zgyro: f32,
16885    #[doc = "X Magnetic field"]
16886    pub xmag: f32,
16887    #[doc = "Y Magnetic field"]
16888    pub ymag: f32,
16889    #[doc = "Z Magnetic field"]
16890    pub zmag: f32,
16891    #[doc = "Absolute pressure"]
16892    pub abs_pressure: f32,
16893    #[doc = "Differential pressure (airspeed)"]
16894    pub diff_pressure: f32,
16895    #[doc = "Altitude calculated from pressure"]
16896    pub pressure_alt: f32,
16897    #[doc = "Temperature"]
16898    pub temperature: f32,
16899    #[doc = "Bitmap for fields that have updated since last message"]
16900    pub fields_updated: HilSensorUpdatedFlags,
16901    #[doc = "Sensor ID (zero indexed). Used for multiple sensor inputs"]
16902    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
16903    pub id: u8,
16904}
16905impl HIL_SENSOR_DATA {
16906    pub const ENCODED_LEN: usize = 65usize;
16907    pub const DEFAULT: Self = Self {
16908        time_usec: 0_u64,
16909        xacc: 0.0_f32,
16910        yacc: 0.0_f32,
16911        zacc: 0.0_f32,
16912        xgyro: 0.0_f32,
16913        ygyro: 0.0_f32,
16914        zgyro: 0.0_f32,
16915        xmag: 0.0_f32,
16916        ymag: 0.0_f32,
16917        zmag: 0.0_f32,
16918        abs_pressure: 0.0_f32,
16919        diff_pressure: 0.0_f32,
16920        pressure_alt: 0.0_f32,
16921        temperature: 0.0_f32,
16922        fields_updated: HilSensorUpdatedFlags::DEFAULT,
16923        id: 0_u8,
16924    };
16925    #[cfg(feature = "arbitrary")]
16926    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16927        use arbitrary::{Arbitrary, Unstructured};
16928        let mut buf = [0u8; 1024];
16929        rng.fill_bytes(&mut buf);
16930        let mut unstructured = Unstructured::new(&buf);
16931        Self::arbitrary(&mut unstructured).unwrap_or_default()
16932    }
16933}
16934impl Default for HIL_SENSOR_DATA {
16935    fn default() -> Self {
16936        Self::DEFAULT.clone()
16937    }
16938}
16939impl MessageData for HIL_SENSOR_DATA {
16940    type Message = MavMessage;
16941    const ID: u32 = 107u32;
16942    const NAME: &'static str = "HIL_SENSOR";
16943    const EXTRA_CRC: u8 = 108u8;
16944    const ENCODED_LEN: usize = 65usize;
16945    fn deser(
16946        _version: MavlinkVersion,
16947        __input: &[u8],
16948    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16949        let avail_len = __input.len();
16950        let mut payload_buf = [0; Self::ENCODED_LEN];
16951        let mut buf = if avail_len < Self::ENCODED_LEN {
16952            payload_buf[0..avail_len].copy_from_slice(__input);
16953            Bytes::new(&payload_buf)
16954        } else {
16955            Bytes::new(__input)
16956        };
16957        let mut __struct = Self::default();
16958        __struct.time_usec = buf.get_u64_le();
16959        __struct.xacc = buf.get_f32_le();
16960        __struct.yacc = buf.get_f32_le();
16961        __struct.zacc = buf.get_f32_le();
16962        __struct.xgyro = buf.get_f32_le();
16963        __struct.ygyro = buf.get_f32_le();
16964        __struct.zgyro = buf.get_f32_le();
16965        __struct.xmag = buf.get_f32_le();
16966        __struct.ymag = buf.get_f32_le();
16967        __struct.zmag = buf.get_f32_le();
16968        __struct.abs_pressure = buf.get_f32_le();
16969        __struct.diff_pressure = buf.get_f32_le();
16970        __struct.pressure_alt = buf.get_f32_le();
16971        __struct.temperature = buf.get_f32_le();
16972        let tmp = buf.get_u32_le();
16973        __struct.fields_updated = HilSensorUpdatedFlags::from_bits(
16974            tmp & HilSensorUpdatedFlags::all().bits(),
16975        )
16976        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
16977            flag_type: "HilSensorUpdatedFlags",
16978            value: tmp as u32,
16979        })?;
16980        __struct.id = buf.get_u8();
16981        Ok(__struct)
16982    }
16983    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16984        let mut __tmp = BytesMut::new(bytes);
16985        #[allow(clippy::absurd_extreme_comparisons)]
16986        #[allow(unused_comparisons)]
16987        if __tmp.remaining() < Self::ENCODED_LEN {
16988            panic!(
16989                "buffer is too small (need {} bytes, but got {})",
16990                Self::ENCODED_LEN,
16991                __tmp.remaining(),
16992            )
16993        }
16994        __tmp.put_u64_le(self.time_usec);
16995        __tmp.put_f32_le(self.xacc);
16996        __tmp.put_f32_le(self.yacc);
16997        __tmp.put_f32_le(self.zacc);
16998        __tmp.put_f32_le(self.xgyro);
16999        __tmp.put_f32_le(self.ygyro);
17000        __tmp.put_f32_le(self.zgyro);
17001        __tmp.put_f32_le(self.xmag);
17002        __tmp.put_f32_le(self.ymag);
17003        __tmp.put_f32_le(self.zmag);
17004        __tmp.put_f32_le(self.abs_pressure);
17005        __tmp.put_f32_le(self.diff_pressure);
17006        __tmp.put_f32_le(self.pressure_alt);
17007        __tmp.put_f32_le(self.temperature);
17008        __tmp.put_u32_le(self.fields_updated.bits());
17009        if matches!(version, MavlinkVersion::V2) {
17010            __tmp.put_u8(self.id);
17011            let len = __tmp.len();
17012            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17013        } else {
17014            __tmp.len()
17015        }
17016    }
17017}
17018#[deprecated = "Suffers from missing airspeed fields and singularities due to Euler angles. See `HIL_STATE_QUATERNION` (Deprecated since 2013-07)"]
17019#[doc = "Sent from simulation to autopilot. This packet is useful for high throughput applications such as hardware in the loop simulations."]
17020#[doc = ""]
17021#[doc = "ID: 90"]
17022#[derive(Debug, Clone, PartialEq)]
17023#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17024#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17025pub struct HIL_STATE_DATA {
17026    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
17027    pub time_usec: u64,
17028    #[doc = "Roll angle"]
17029    pub roll: f32,
17030    #[doc = "Pitch angle"]
17031    pub pitch: f32,
17032    #[doc = "Yaw angle"]
17033    pub yaw: f32,
17034    #[doc = "Body frame roll / phi angular speed"]
17035    pub rollspeed: f32,
17036    #[doc = "Body frame pitch / theta angular speed"]
17037    pub pitchspeed: f32,
17038    #[doc = "Body frame yaw / psi angular speed"]
17039    pub yawspeed: f32,
17040    #[doc = "Latitude"]
17041    pub lat: i32,
17042    #[doc = "Longitude"]
17043    pub lon: i32,
17044    #[doc = "Altitude"]
17045    pub alt: i32,
17046    #[doc = "Ground X Speed (Latitude)"]
17047    pub vx: i16,
17048    #[doc = "Ground Y Speed (Longitude)"]
17049    pub vy: i16,
17050    #[doc = "Ground Z Speed (Altitude)"]
17051    pub vz: i16,
17052    #[doc = "X acceleration"]
17053    pub xacc: i16,
17054    #[doc = "Y acceleration"]
17055    pub yacc: i16,
17056    #[doc = "Z acceleration"]
17057    pub zacc: i16,
17058}
17059impl HIL_STATE_DATA {
17060    pub const ENCODED_LEN: usize = 56usize;
17061    pub const DEFAULT: Self = Self {
17062        time_usec: 0_u64,
17063        roll: 0.0_f32,
17064        pitch: 0.0_f32,
17065        yaw: 0.0_f32,
17066        rollspeed: 0.0_f32,
17067        pitchspeed: 0.0_f32,
17068        yawspeed: 0.0_f32,
17069        lat: 0_i32,
17070        lon: 0_i32,
17071        alt: 0_i32,
17072        vx: 0_i16,
17073        vy: 0_i16,
17074        vz: 0_i16,
17075        xacc: 0_i16,
17076        yacc: 0_i16,
17077        zacc: 0_i16,
17078    };
17079    #[cfg(feature = "arbitrary")]
17080    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17081        use arbitrary::{Arbitrary, Unstructured};
17082        let mut buf = [0u8; 1024];
17083        rng.fill_bytes(&mut buf);
17084        let mut unstructured = Unstructured::new(&buf);
17085        Self::arbitrary(&mut unstructured).unwrap_or_default()
17086    }
17087}
17088impl Default for HIL_STATE_DATA {
17089    fn default() -> Self {
17090        Self::DEFAULT.clone()
17091    }
17092}
17093impl MessageData for HIL_STATE_DATA {
17094    type Message = MavMessage;
17095    const ID: u32 = 90u32;
17096    const NAME: &'static str = "HIL_STATE";
17097    const EXTRA_CRC: u8 = 183u8;
17098    const ENCODED_LEN: usize = 56usize;
17099    fn deser(
17100        _version: MavlinkVersion,
17101        __input: &[u8],
17102    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17103        let avail_len = __input.len();
17104        let mut payload_buf = [0; Self::ENCODED_LEN];
17105        let mut buf = if avail_len < Self::ENCODED_LEN {
17106            payload_buf[0..avail_len].copy_from_slice(__input);
17107            Bytes::new(&payload_buf)
17108        } else {
17109            Bytes::new(__input)
17110        };
17111        let mut __struct = Self::default();
17112        __struct.time_usec = buf.get_u64_le();
17113        __struct.roll = buf.get_f32_le();
17114        __struct.pitch = buf.get_f32_le();
17115        __struct.yaw = buf.get_f32_le();
17116        __struct.rollspeed = buf.get_f32_le();
17117        __struct.pitchspeed = buf.get_f32_le();
17118        __struct.yawspeed = buf.get_f32_le();
17119        __struct.lat = buf.get_i32_le();
17120        __struct.lon = buf.get_i32_le();
17121        __struct.alt = buf.get_i32_le();
17122        __struct.vx = buf.get_i16_le();
17123        __struct.vy = buf.get_i16_le();
17124        __struct.vz = buf.get_i16_le();
17125        __struct.xacc = buf.get_i16_le();
17126        __struct.yacc = buf.get_i16_le();
17127        __struct.zacc = buf.get_i16_le();
17128        Ok(__struct)
17129    }
17130    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17131        let mut __tmp = BytesMut::new(bytes);
17132        #[allow(clippy::absurd_extreme_comparisons)]
17133        #[allow(unused_comparisons)]
17134        if __tmp.remaining() < Self::ENCODED_LEN {
17135            panic!(
17136                "buffer is too small (need {} bytes, but got {})",
17137                Self::ENCODED_LEN,
17138                __tmp.remaining(),
17139            )
17140        }
17141        __tmp.put_u64_le(self.time_usec);
17142        __tmp.put_f32_le(self.roll);
17143        __tmp.put_f32_le(self.pitch);
17144        __tmp.put_f32_le(self.yaw);
17145        __tmp.put_f32_le(self.rollspeed);
17146        __tmp.put_f32_le(self.pitchspeed);
17147        __tmp.put_f32_le(self.yawspeed);
17148        __tmp.put_i32_le(self.lat);
17149        __tmp.put_i32_le(self.lon);
17150        __tmp.put_i32_le(self.alt);
17151        __tmp.put_i16_le(self.vx);
17152        __tmp.put_i16_le(self.vy);
17153        __tmp.put_i16_le(self.vz);
17154        __tmp.put_i16_le(self.xacc);
17155        __tmp.put_i16_le(self.yacc);
17156        __tmp.put_i16_le(self.zacc);
17157        if matches!(version, MavlinkVersion::V2) {
17158            let len = __tmp.len();
17159            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17160        } else {
17161            __tmp.len()
17162        }
17163    }
17164}
17165#[doc = "Sent from simulation to autopilot, avoids in contrast to HIL_STATE singularities. This packet is useful for high throughput applications such as hardware in the loop simulations."]
17166#[doc = ""]
17167#[doc = "ID: 115"]
17168#[derive(Debug, Clone, PartialEq)]
17169#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17170#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17171pub struct HIL_STATE_QUATERNION_DATA {
17172    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
17173    pub time_usec: u64,
17174    #[doc = "Vehicle attitude expressed as normalized quaternion in w, x, y, z order (with 1 0 0 0 being the null-rotation)"]
17175    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
17176    pub attitude_quaternion: [f32; 4],
17177    #[doc = "Body frame roll / phi angular speed"]
17178    pub rollspeed: f32,
17179    #[doc = "Body frame pitch / theta angular speed"]
17180    pub pitchspeed: f32,
17181    #[doc = "Body frame yaw / psi angular speed"]
17182    pub yawspeed: f32,
17183    #[doc = "Latitude"]
17184    pub lat: i32,
17185    #[doc = "Longitude"]
17186    pub lon: i32,
17187    #[doc = "Altitude"]
17188    pub alt: i32,
17189    #[doc = "Ground X Speed (Latitude)"]
17190    pub vx: i16,
17191    #[doc = "Ground Y Speed (Longitude)"]
17192    pub vy: i16,
17193    #[doc = "Ground Z Speed (Altitude)"]
17194    pub vz: i16,
17195    #[doc = "Indicated airspeed"]
17196    pub ind_airspeed: u16,
17197    #[doc = "True airspeed"]
17198    pub true_airspeed: u16,
17199    #[doc = "X acceleration"]
17200    pub xacc: i16,
17201    #[doc = "Y acceleration"]
17202    pub yacc: i16,
17203    #[doc = "Z acceleration"]
17204    pub zacc: i16,
17205}
17206impl HIL_STATE_QUATERNION_DATA {
17207    pub const ENCODED_LEN: usize = 64usize;
17208    pub const DEFAULT: Self = Self {
17209        time_usec: 0_u64,
17210        attitude_quaternion: [0.0_f32; 4usize],
17211        rollspeed: 0.0_f32,
17212        pitchspeed: 0.0_f32,
17213        yawspeed: 0.0_f32,
17214        lat: 0_i32,
17215        lon: 0_i32,
17216        alt: 0_i32,
17217        vx: 0_i16,
17218        vy: 0_i16,
17219        vz: 0_i16,
17220        ind_airspeed: 0_u16,
17221        true_airspeed: 0_u16,
17222        xacc: 0_i16,
17223        yacc: 0_i16,
17224        zacc: 0_i16,
17225    };
17226    #[cfg(feature = "arbitrary")]
17227    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17228        use arbitrary::{Arbitrary, Unstructured};
17229        let mut buf = [0u8; 1024];
17230        rng.fill_bytes(&mut buf);
17231        let mut unstructured = Unstructured::new(&buf);
17232        Self::arbitrary(&mut unstructured).unwrap_or_default()
17233    }
17234}
17235impl Default for HIL_STATE_QUATERNION_DATA {
17236    fn default() -> Self {
17237        Self::DEFAULT.clone()
17238    }
17239}
17240impl MessageData for HIL_STATE_QUATERNION_DATA {
17241    type Message = MavMessage;
17242    const ID: u32 = 115u32;
17243    const NAME: &'static str = "HIL_STATE_QUATERNION";
17244    const EXTRA_CRC: u8 = 4u8;
17245    const ENCODED_LEN: usize = 64usize;
17246    fn deser(
17247        _version: MavlinkVersion,
17248        __input: &[u8],
17249    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17250        let avail_len = __input.len();
17251        let mut payload_buf = [0; Self::ENCODED_LEN];
17252        let mut buf = if avail_len < Self::ENCODED_LEN {
17253            payload_buf[0..avail_len].copy_from_slice(__input);
17254            Bytes::new(&payload_buf)
17255        } else {
17256            Bytes::new(__input)
17257        };
17258        let mut __struct = Self::default();
17259        __struct.time_usec = buf.get_u64_le();
17260        for v in &mut __struct.attitude_quaternion {
17261            let val = buf.get_f32_le();
17262            *v = val;
17263        }
17264        __struct.rollspeed = buf.get_f32_le();
17265        __struct.pitchspeed = buf.get_f32_le();
17266        __struct.yawspeed = buf.get_f32_le();
17267        __struct.lat = buf.get_i32_le();
17268        __struct.lon = buf.get_i32_le();
17269        __struct.alt = buf.get_i32_le();
17270        __struct.vx = buf.get_i16_le();
17271        __struct.vy = buf.get_i16_le();
17272        __struct.vz = buf.get_i16_le();
17273        __struct.ind_airspeed = buf.get_u16_le();
17274        __struct.true_airspeed = buf.get_u16_le();
17275        __struct.xacc = buf.get_i16_le();
17276        __struct.yacc = buf.get_i16_le();
17277        __struct.zacc = buf.get_i16_le();
17278        Ok(__struct)
17279    }
17280    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17281        let mut __tmp = BytesMut::new(bytes);
17282        #[allow(clippy::absurd_extreme_comparisons)]
17283        #[allow(unused_comparisons)]
17284        if __tmp.remaining() < Self::ENCODED_LEN {
17285            panic!(
17286                "buffer is too small (need {} bytes, but got {})",
17287                Self::ENCODED_LEN,
17288                __tmp.remaining(),
17289            )
17290        }
17291        __tmp.put_u64_le(self.time_usec);
17292        for val in &self.attitude_quaternion {
17293            __tmp.put_f32_le(*val);
17294        }
17295        __tmp.put_f32_le(self.rollspeed);
17296        __tmp.put_f32_le(self.pitchspeed);
17297        __tmp.put_f32_le(self.yawspeed);
17298        __tmp.put_i32_le(self.lat);
17299        __tmp.put_i32_le(self.lon);
17300        __tmp.put_i32_le(self.alt);
17301        __tmp.put_i16_le(self.vx);
17302        __tmp.put_i16_le(self.vy);
17303        __tmp.put_i16_le(self.vz);
17304        __tmp.put_u16_le(self.ind_airspeed);
17305        __tmp.put_u16_le(self.true_airspeed);
17306        __tmp.put_i16_le(self.xacc);
17307        __tmp.put_i16_le(self.yacc);
17308        __tmp.put_i16_le(self.zacc);
17309        if matches!(version, MavlinkVersion::V2) {
17310            let len = __tmp.len();
17311            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17312        } else {
17313            __tmp.len()
17314        }
17315    }
17316}
17317#[doc = "Contains the home position. \tThe home position is the default position that the system will return to and land on. \tThe position must be set automatically by the system during the takeoff, and may also be explicitly set using MAV_CMD_DO_SET_HOME. \tThe global and local positions encode the position in the respective coordinate frames, while the q parameter encodes the orientation of the surface. \tUnder normal conditions it describes the heading and terrain slope, which can be used by the aircraft to adjust the approach. \tThe approach 3D vector describes the point to which the system should fly in normal flight mode and then perform a landing sequence along the vector.         Note: this message can be requested by sending the MAV_CMD_REQUEST_MESSAGE with param1=242 (or the deprecated MAV_CMD_GET_HOME_POSITION command)."]
17318#[doc = ""]
17319#[doc = "ID: 242"]
17320#[derive(Debug, Clone, PartialEq)]
17321#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17322#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17323pub struct HOME_POSITION_DATA {
17324    #[doc = "Latitude (WGS84)"]
17325    pub latitude: i32,
17326    #[doc = "Longitude (WGS84)"]
17327    pub longitude: i32,
17328    #[doc = "Altitude (MSL). Positive for up."]
17329    pub altitude: i32,
17330    #[doc = "Local X position of this position in the local coordinate frame (NED)"]
17331    pub x: f32,
17332    #[doc = "Local Y position of this position in the local coordinate frame (NED)"]
17333    pub y: f32,
17334    #[doc = "Local Z position of this position in the local coordinate frame (NED: positive \"down\")"]
17335    pub z: f32,
17336    #[doc = "Quaternion indicating world-to-surface-normal and heading transformation of the takeoff position.         Used to indicate the heading and slope of the ground.         All fields should be set to NaN if an accurate quaternion for both heading and surface slope cannot be supplied."]
17337    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
17338    pub q: [f32; 4],
17339    #[doc = "Local X position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
17340    pub approach_x: f32,
17341    #[doc = "Local Y position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
17342    pub approach_y: f32,
17343    #[doc = "Local Z position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
17344    pub approach_z: f32,
17345    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
17346    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
17347    pub time_usec: u64,
17348}
17349impl HOME_POSITION_DATA {
17350    pub const ENCODED_LEN: usize = 60usize;
17351    pub const DEFAULT: Self = Self {
17352        latitude: 0_i32,
17353        longitude: 0_i32,
17354        altitude: 0_i32,
17355        x: 0.0_f32,
17356        y: 0.0_f32,
17357        z: 0.0_f32,
17358        q: [0.0_f32; 4usize],
17359        approach_x: 0.0_f32,
17360        approach_y: 0.0_f32,
17361        approach_z: 0.0_f32,
17362        time_usec: 0_u64,
17363    };
17364    #[cfg(feature = "arbitrary")]
17365    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17366        use arbitrary::{Arbitrary, Unstructured};
17367        let mut buf = [0u8; 1024];
17368        rng.fill_bytes(&mut buf);
17369        let mut unstructured = Unstructured::new(&buf);
17370        Self::arbitrary(&mut unstructured).unwrap_or_default()
17371    }
17372}
17373impl Default for HOME_POSITION_DATA {
17374    fn default() -> Self {
17375        Self::DEFAULT.clone()
17376    }
17377}
17378impl MessageData for HOME_POSITION_DATA {
17379    type Message = MavMessage;
17380    const ID: u32 = 242u32;
17381    const NAME: &'static str = "HOME_POSITION";
17382    const EXTRA_CRC: u8 = 104u8;
17383    const ENCODED_LEN: usize = 60usize;
17384    fn deser(
17385        _version: MavlinkVersion,
17386        __input: &[u8],
17387    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17388        let avail_len = __input.len();
17389        let mut payload_buf = [0; Self::ENCODED_LEN];
17390        let mut buf = if avail_len < Self::ENCODED_LEN {
17391            payload_buf[0..avail_len].copy_from_slice(__input);
17392            Bytes::new(&payload_buf)
17393        } else {
17394            Bytes::new(__input)
17395        };
17396        let mut __struct = Self::default();
17397        __struct.latitude = buf.get_i32_le();
17398        __struct.longitude = buf.get_i32_le();
17399        __struct.altitude = buf.get_i32_le();
17400        __struct.x = buf.get_f32_le();
17401        __struct.y = buf.get_f32_le();
17402        __struct.z = buf.get_f32_le();
17403        for v in &mut __struct.q {
17404            let val = buf.get_f32_le();
17405            *v = val;
17406        }
17407        __struct.approach_x = buf.get_f32_le();
17408        __struct.approach_y = buf.get_f32_le();
17409        __struct.approach_z = buf.get_f32_le();
17410        __struct.time_usec = buf.get_u64_le();
17411        Ok(__struct)
17412    }
17413    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17414        let mut __tmp = BytesMut::new(bytes);
17415        #[allow(clippy::absurd_extreme_comparisons)]
17416        #[allow(unused_comparisons)]
17417        if __tmp.remaining() < Self::ENCODED_LEN {
17418            panic!(
17419                "buffer is too small (need {} bytes, but got {})",
17420                Self::ENCODED_LEN,
17421                __tmp.remaining(),
17422            )
17423        }
17424        __tmp.put_i32_le(self.latitude);
17425        __tmp.put_i32_le(self.longitude);
17426        __tmp.put_i32_le(self.altitude);
17427        __tmp.put_f32_le(self.x);
17428        __tmp.put_f32_le(self.y);
17429        __tmp.put_f32_le(self.z);
17430        for val in &self.q {
17431            __tmp.put_f32_le(*val);
17432        }
17433        __tmp.put_f32_le(self.approach_x);
17434        __tmp.put_f32_le(self.approach_y);
17435        __tmp.put_f32_le(self.approach_z);
17436        if matches!(version, MavlinkVersion::V2) {
17437            __tmp.put_u64_le(self.time_usec);
17438            let len = __tmp.len();
17439            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17440        } else {
17441            __tmp.len()
17442        }
17443    }
17444}
17445#[doc = "Temperature and humidity from hygrometer."]
17446#[doc = ""]
17447#[doc = "ID: 12920"]
17448#[derive(Debug, Clone, PartialEq)]
17449#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17450#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17451pub struct HYGROMETER_SENSOR_DATA {
17452    #[doc = "Temperature"]
17453    pub temperature: i16,
17454    #[doc = "Humidity"]
17455    pub humidity: u16,
17456    #[doc = "Hygrometer ID"]
17457    pub id: u8,
17458}
17459impl HYGROMETER_SENSOR_DATA {
17460    pub const ENCODED_LEN: usize = 5usize;
17461    pub const DEFAULT: Self = Self {
17462        temperature: 0_i16,
17463        humidity: 0_u16,
17464        id: 0_u8,
17465    };
17466    #[cfg(feature = "arbitrary")]
17467    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17468        use arbitrary::{Arbitrary, Unstructured};
17469        let mut buf = [0u8; 1024];
17470        rng.fill_bytes(&mut buf);
17471        let mut unstructured = Unstructured::new(&buf);
17472        Self::arbitrary(&mut unstructured).unwrap_or_default()
17473    }
17474}
17475impl Default for HYGROMETER_SENSOR_DATA {
17476    fn default() -> Self {
17477        Self::DEFAULT.clone()
17478    }
17479}
17480impl MessageData for HYGROMETER_SENSOR_DATA {
17481    type Message = MavMessage;
17482    const ID: u32 = 12920u32;
17483    const NAME: &'static str = "HYGROMETER_SENSOR";
17484    const EXTRA_CRC: u8 = 20u8;
17485    const ENCODED_LEN: usize = 5usize;
17486    fn deser(
17487        _version: MavlinkVersion,
17488        __input: &[u8],
17489    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17490        let avail_len = __input.len();
17491        let mut payload_buf = [0; Self::ENCODED_LEN];
17492        let mut buf = if avail_len < Self::ENCODED_LEN {
17493            payload_buf[0..avail_len].copy_from_slice(__input);
17494            Bytes::new(&payload_buf)
17495        } else {
17496            Bytes::new(__input)
17497        };
17498        let mut __struct = Self::default();
17499        __struct.temperature = buf.get_i16_le();
17500        __struct.humidity = buf.get_u16_le();
17501        __struct.id = buf.get_u8();
17502        Ok(__struct)
17503    }
17504    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17505        let mut __tmp = BytesMut::new(bytes);
17506        #[allow(clippy::absurd_extreme_comparisons)]
17507        #[allow(unused_comparisons)]
17508        if __tmp.remaining() < Self::ENCODED_LEN {
17509            panic!(
17510                "buffer is too small (need {} bytes, but got {})",
17511                Self::ENCODED_LEN,
17512                __tmp.remaining(),
17513            )
17514        }
17515        __tmp.put_i16_le(self.temperature);
17516        __tmp.put_u16_le(self.humidity);
17517        __tmp.put_u8(self.id);
17518        if matches!(version, MavlinkVersion::V2) {
17519            let len = __tmp.len();
17520            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17521        } else {
17522            __tmp.len()
17523        }
17524    }
17525}
17526#[doc = "Illuminator status."]
17527#[doc = ""]
17528#[doc = "ID: 440"]
17529#[derive(Debug, Clone, PartialEq)]
17530#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17531#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17532pub struct ILLUMINATOR_STATUS_DATA {
17533    #[doc = "Time since the start-up of the illuminator in ms"]
17534    pub uptime_ms: u32,
17535    #[doc = "Errors"]
17536    pub error_status: IlluminatorErrorFlags,
17537    #[doc = "Illuminator brightness"]
17538    pub brightness: f32,
17539    #[doc = "Illuminator strobing period in seconds"]
17540    pub strobe_period: f32,
17541    #[doc = "Illuminator strobing duty cycle"]
17542    pub strobe_duty_cycle: f32,
17543    #[doc = "Temperature in Celsius"]
17544    pub temp_c: f32,
17545    #[doc = "Minimum strobing period in seconds"]
17546    pub min_strobe_period: f32,
17547    #[doc = "Maximum strobing period in seconds"]
17548    pub max_strobe_period: f32,
17549    #[doc = "0: Illuminators OFF, 1: Illuminators ON"]
17550    pub enable: u8,
17551    #[doc = "Supported illuminator modes"]
17552    pub mode_bitmask: IlluminatorMode,
17553    #[doc = "Illuminator mode"]
17554    pub mode: IlluminatorMode,
17555}
17556impl ILLUMINATOR_STATUS_DATA {
17557    pub const ENCODED_LEN: usize = 35usize;
17558    pub const DEFAULT: Self = Self {
17559        uptime_ms: 0_u32,
17560        error_status: IlluminatorErrorFlags::DEFAULT,
17561        brightness: 0.0_f32,
17562        strobe_period: 0.0_f32,
17563        strobe_duty_cycle: 0.0_f32,
17564        temp_c: 0.0_f32,
17565        min_strobe_period: 0.0_f32,
17566        max_strobe_period: 0.0_f32,
17567        enable: 0_u8,
17568        mode_bitmask: IlluminatorMode::DEFAULT,
17569        mode: IlluminatorMode::DEFAULT,
17570    };
17571    #[cfg(feature = "arbitrary")]
17572    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17573        use arbitrary::{Arbitrary, Unstructured};
17574        let mut buf = [0u8; 1024];
17575        rng.fill_bytes(&mut buf);
17576        let mut unstructured = Unstructured::new(&buf);
17577        Self::arbitrary(&mut unstructured).unwrap_or_default()
17578    }
17579}
17580impl Default for ILLUMINATOR_STATUS_DATA {
17581    fn default() -> Self {
17582        Self::DEFAULT.clone()
17583    }
17584}
17585impl MessageData for ILLUMINATOR_STATUS_DATA {
17586    type Message = MavMessage;
17587    const ID: u32 = 440u32;
17588    const NAME: &'static str = "ILLUMINATOR_STATUS";
17589    const EXTRA_CRC: u8 = 66u8;
17590    const ENCODED_LEN: usize = 35usize;
17591    fn deser(
17592        _version: MavlinkVersion,
17593        __input: &[u8],
17594    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17595        let avail_len = __input.len();
17596        let mut payload_buf = [0; Self::ENCODED_LEN];
17597        let mut buf = if avail_len < Self::ENCODED_LEN {
17598            payload_buf[0..avail_len].copy_from_slice(__input);
17599            Bytes::new(&payload_buf)
17600        } else {
17601            Bytes::new(__input)
17602        };
17603        let mut __struct = Self::default();
17604        __struct.uptime_ms = buf.get_u32_le();
17605        let tmp = buf.get_u32_le();
17606        __struct.error_status = IlluminatorErrorFlags::from_bits(
17607            tmp & IlluminatorErrorFlags::all().bits(),
17608        )
17609        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
17610            flag_type: "IlluminatorErrorFlags",
17611            value: tmp as u32,
17612        })?;
17613        __struct.brightness = buf.get_f32_le();
17614        __struct.strobe_period = buf.get_f32_le();
17615        __struct.strobe_duty_cycle = buf.get_f32_le();
17616        __struct.temp_c = buf.get_f32_le();
17617        __struct.min_strobe_period = buf.get_f32_le();
17618        __struct.max_strobe_period = buf.get_f32_le();
17619        __struct.enable = buf.get_u8();
17620        let tmp = buf.get_u8();
17621        __struct.mode_bitmask =
17622            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
17623                enum_type: "IlluminatorMode",
17624                value: tmp as u32,
17625            })?;
17626        let tmp = buf.get_u8();
17627        __struct.mode =
17628            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
17629                enum_type: "IlluminatorMode",
17630                value: tmp as u32,
17631            })?;
17632        Ok(__struct)
17633    }
17634    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17635        let mut __tmp = BytesMut::new(bytes);
17636        #[allow(clippy::absurd_extreme_comparisons)]
17637        #[allow(unused_comparisons)]
17638        if __tmp.remaining() < Self::ENCODED_LEN {
17639            panic!(
17640                "buffer is too small (need {} bytes, but got {})",
17641                Self::ENCODED_LEN,
17642                __tmp.remaining(),
17643            )
17644        }
17645        __tmp.put_u32_le(self.uptime_ms);
17646        __tmp.put_u32_le(self.error_status.bits());
17647        __tmp.put_f32_le(self.brightness);
17648        __tmp.put_f32_le(self.strobe_period);
17649        __tmp.put_f32_le(self.strobe_duty_cycle);
17650        __tmp.put_f32_le(self.temp_c);
17651        __tmp.put_f32_le(self.min_strobe_period);
17652        __tmp.put_f32_le(self.max_strobe_period);
17653        __tmp.put_u8(self.enable);
17654        __tmp.put_u8(self.mode_bitmask as u8);
17655        __tmp.put_u8(self.mode as u8);
17656        if matches!(version, MavlinkVersion::V2) {
17657            let len = __tmp.len();
17658            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17659        } else {
17660            __tmp.len()
17661        }
17662    }
17663}
17664#[doc = "Status of the Iridium SBD link."]
17665#[doc = ""]
17666#[doc = "ID: 335"]
17667#[derive(Debug, Clone, PartialEq)]
17668#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17669#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17670pub struct ISBD_LINK_STATUS_DATA {
17671    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
17672    pub timestamp: u64,
17673    #[doc = "Timestamp of the last successful sbd session. The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
17674    pub last_heartbeat: u64,
17675    #[doc = "Number of failed SBD sessions."]
17676    pub failed_sessions: u16,
17677    #[doc = "Number of successful SBD sessions."]
17678    pub successful_sessions: u16,
17679    #[doc = "Signal quality equal to the number of bars displayed on the ISU signal strength indicator. Range is 0 to 5, where 0 indicates no signal and 5 indicates maximum signal strength."]
17680    pub signal_quality: u8,
17681    #[doc = "1: Ring call pending, 0: No call pending."]
17682    pub ring_pending: u8,
17683    #[doc = "1: Transmission session pending, 0: No transmission session pending."]
17684    pub tx_session_pending: u8,
17685    #[doc = "1: Receiving session pending, 0: No receiving session pending."]
17686    pub rx_session_pending: u8,
17687}
17688impl ISBD_LINK_STATUS_DATA {
17689    pub const ENCODED_LEN: usize = 24usize;
17690    pub const DEFAULT: Self = Self {
17691        timestamp: 0_u64,
17692        last_heartbeat: 0_u64,
17693        failed_sessions: 0_u16,
17694        successful_sessions: 0_u16,
17695        signal_quality: 0_u8,
17696        ring_pending: 0_u8,
17697        tx_session_pending: 0_u8,
17698        rx_session_pending: 0_u8,
17699    };
17700    #[cfg(feature = "arbitrary")]
17701    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17702        use arbitrary::{Arbitrary, Unstructured};
17703        let mut buf = [0u8; 1024];
17704        rng.fill_bytes(&mut buf);
17705        let mut unstructured = Unstructured::new(&buf);
17706        Self::arbitrary(&mut unstructured).unwrap_or_default()
17707    }
17708}
17709impl Default for ISBD_LINK_STATUS_DATA {
17710    fn default() -> Self {
17711        Self::DEFAULT.clone()
17712    }
17713}
17714impl MessageData for ISBD_LINK_STATUS_DATA {
17715    type Message = MavMessage;
17716    const ID: u32 = 335u32;
17717    const NAME: &'static str = "ISBD_LINK_STATUS";
17718    const EXTRA_CRC: u8 = 225u8;
17719    const ENCODED_LEN: usize = 24usize;
17720    fn deser(
17721        _version: MavlinkVersion,
17722        __input: &[u8],
17723    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17724        let avail_len = __input.len();
17725        let mut payload_buf = [0; Self::ENCODED_LEN];
17726        let mut buf = if avail_len < Self::ENCODED_LEN {
17727            payload_buf[0..avail_len].copy_from_slice(__input);
17728            Bytes::new(&payload_buf)
17729        } else {
17730            Bytes::new(__input)
17731        };
17732        let mut __struct = Self::default();
17733        __struct.timestamp = buf.get_u64_le();
17734        __struct.last_heartbeat = buf.get_u64_le();
17735        __struct.failed_sessions = buf.get_u16_le();
17736        __struct.successful_sessions = buf.get_u16_le();
17737        __struct.signal_quality = buf.get_u8();
17738        __struct.ring_pending = buf.get_u8();
17739        __struct.tx_session_pending = buf.get_u8();
17740        __struct.rx_session_pending = buf.get_u8();
17741        Ok(__struct)
17742    }
17743    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17744        let mut __tmp = BytesMut::new(bytes);
17745        #[allow(clippy::absurd_extreme_comparisons)]
17746        #[allow(unused_comparisons)]
17747        if __tmp.remaining() < Self::ENCODED_LEN {
17748            panic!(
17749                "buffer is too small (need {} bytes, but got {})",
17750                Self::ENCODED_LEN,
17751                __tmp.remaining(),
17752            )
17753        }
17754        __tmp.put_u64_le(self.timestamp);
17755        __tmp.put_u64_le(self.last_heartbeat);
17756        __tmp.put_u16_le(self.failed_sessions);
17757        __tmp.put_u16_le(self.successful_sessions);
17758        __tmp.put_u8(self.signal_quality);
17759        __tmp.put_u8(self.ring_pending);
17760        __tmp.put_u8(self.tx_session_pending);
17761        __tmp.put_u8(self.rx_session_pending);
17762        if matches!(version, MavlinkVersion::V2) {
17763            let len = __tmp.len();
17764            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17765        } else {
17766            __tmp.len()
17767        }
17768    }
17769}
17770#[doc = "The location of a landing target. See: <https://mavlink.io/en/services/landing_target.html>."]
17771#[doc = ""]
17772#[doc = "ID: 149"]
17773#[derive(Debug, Clone, PartialEq)]
17774#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17775#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17776pub struct LANDING_TARGET_DATA {
17777    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
17778    pub time_usec: u64,
17779    #[doc = "X-axis angular offset of the target from the center of the image"]
17780    pub angle_x: f32,
17781    #[doc = "Y-axis angular offset of the target from the center of the image"]
17782    pub angle_y: f32,
17783    #[doc = "Distance to the target from the vehicle"]
17784    pub distance: f32,
17785    #[doc = "Size of target along x-axis"]
17786    pub size_x: f32,
17787    #[doc = "Size of target along y-axis"]
17788    pub size_y: f32,
17789    #[doc = "The ID of the target if multiple targets are present"]
17790    pub target_num: u8,
17791    #[doc = "Coordinate frame used for following fields."]
17792    pub frame: MavFrame,
17793    #[doc = "X Position of the landing target in MAV_FRAME"]
17794    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
17795    pub x: f32,
17796    #[doc = "Y Position of the landing target in MAV_FRAME"]
17797    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
17798    pub y: f32,
17799    #[doc = "Z Position of the landing target in MAV_FRAME"]
17800    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
17801    pub z: f32,
17802    #[doc = "Quaternion of landing target orientation (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
17803    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
17804    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
17805    pub q: [f32; 4],
17806    #[doc = "Type of landing target"]
17807    #[cfg_attr(feature = "serde", serde(default))]
17808    pub mavtype: LandingTargetType,
17809    #[doc = "Boolean indicating whether the position fields (x, y, z, q, type) contain valid target position information (valid: 1, invalid: 0). Default is 0 (invalid)."]
17810    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
17811    pub position_valid: u8,
17812}
17813impl LANDING_TARGET_DATA {
17814    pub const ENCODED_LEN: usize = 60usize;
17815    pub const DEFAULT: Self = Self {
17816        time_usec: 0_u64,
17817        angle_x: 0.0_f32,
17818        angle_y: 0.0_f32,
17819        distance: 0.0_f32,
17820        size_x: 0.0_f32,
17821        size_y: 0.0_f32,
17822        target_num: 0_u8,
17823        frame: MavFrame::DEFAULT,
17824        x: 0.0_f32,
17825        y: 0.0_f32,
17826        z: 0.0_f32,
17827        q: [0.0_f32; 4usize],
17828        mavtype: LandingTargetType::DEFAULT,
17829        position_valid: 0_u8,
17830    };
17831    #[cfg(feature = "arbitrary")]
17832    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17833        use arbitrary::{Arbitrary, Unstructured};
17834        let mut buf = [0u8; 1024];
17835        rng.fill_bytes(&mut buf);
17836        let mut unstructured = Unstructured::new(&buf);
17837        Self::arbitrary(&mut unstructured).unwrap_or_default()
17838    }
17839}
17840impl Default for LANDING_TARGET_DATA {
17841    fn default() -> Self {
17842        Self::DEFAULT.clone()
17843    }
17844}
17845impl MessageData for LANDING_TARGET_DATA {
17846    type Message = MavMessage;
17847    const ID: u32 = 149u32;
17848    const NAME: &'static str = "LANDING_TARGET";
17849    const EXTRA_CRC: u8 = 200u8;
17850    const ENCODED_LEN: usize = 60usize;
17851    fn deser(
17852        _version: MavlinkVersion,
17853        __input: &[u8],
17854    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17855        let avail_len = __input.len();
17856        let mut payload_buf = [0; Self::ENCODED_LEN];
17857        let mut buf = if avail_len < Self::ENCODED_LEN {
17858            payload_buf[0..avail_len].copy_from_slice(__input);
17859            Bytes::new(&payload_buf)
17860        } else {
17861            Bytes::new(__input)
17862        };
17863        let mut __struct = Self::default();
17864        __struct.time_usec = buf.get_u64_le();
17865        __struct.angle_x = buf.get_f32_le();
17866        __struct.angle_y = buf.get_f32_le();
17867        __struct.distance = buf.get_f32_le();
17868        __struct.size_x = buf.get_f32_le();
17869        __struct.size_y = buf.get_f32_le();
17870        __struct.target_num = buf.get_u8();
17871        let tmp = buf.get_u8();
17872        __struct.frame =
17873            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
17874                enum_type: "MavFrame",
17875                value: tmp as u32,
17876            })?;
17877        __struct.x = buf.get_f32_le();
17878        __struct.y = buf.get_f32_le();
17879        __struct.z = buf.get_f32_le();
17880        for v in &mut __struct.q {
17881            let val = buf.get_f32_le();
17882            *v = val;
17883        }
17884        let tmp = buf.get_u8();
17885        __struct.mavtype =
17886            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
17887                enum_type: "LandingTargetType",
17888                value: tmp as u32,
17889            })?;
17890        __struct.position_valid = buf.get_u8();
17891        Ok(__struct)
17892    }
17893    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17894        let mut __tmp = BytesMut::new(bytes);
17895        #[allow(clippy::absurd_extreme_comparisons)]
17896        #[allow(unused_comparisons)]
17897        if __tmp.remaining() < Self::ENCODED_LEN {
17898            panic!(
17899                "buffer is too small (need {} bytes, but got {})",
17900                Self::ENCODED_LEN,
17901                __tmp.remaining(),
17902            )
17903        }
17904        __tmp.put_u64_le(self.time_usec);
17905        __tmp.put_f32_le(self.angle_x);
17906        __tmp.put_f32_le(self.angle_y);
17907        __tmp.put_f32_le(self.distance);
17908        __tmp.put_f32_le(self.size_x);
17909        __tmp.put_f32_le(self.size_y);
17910        __tmp.put_u8(self.target_num);
17911        __tmp.put_u8(self.frame as u8);
17912        if matches!(version, MavlinkVersion::V2) {
17913            __tmp.put_f32_le(self.x);
17914            __tmp.put_f32_le(self.y);
17915            __tmp.put_f32_le(self.z);
17916            for val in &self.q {
17917                __tmp.put_f32_le(*val);
17918            }
17919            __tmp.put_u8(self.mavtype as u8);
17920            __tmp.put_u8(self.position_valid);
17921            let len = __tmp.len();
17922            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17923        } else {
17924            __tmp.len()
17925        }
17926    }
17927}
17928#[doc = "Status generated in each node in the communication chain and injected into MAVLink stream."]
17929#[doc = ""]
17930#[doc = "ID: 8"]
17931#[derive(Debug, Clone, PartialEq)]
17932#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17933#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17934pub struct LINK_NODE_STATUS_DATA {
17935    #[doc = "Timestamp (time since system boot)."]
17936    pub timestamp: u64,
17937    #[doc = "Transmit rate"]
17938    pub tx_rate: u32,
17939    #[doc = "Receive rate"]
17940    pub rx_rate: u32,
17941    #[doc = "Messages sent"]
17942    pub messages_sent: u32,
17943    #[doc = "Messages received (estimated from counting seq)"]
17944    pub messages_received: u32,
17945    #[doc = "Messages lost (estimated from counting seq)"]
17946    pub messages_lost: u32,
17947    #[doc = "Number of bytes that could not be parsed correctly."]
17948    pub rx_parse_err: u16,
17949    #[doc = "Transmit buffer overflows. This number wraps around as it reaches UINT16_MAX"]
17950    pub tx_overflows: u16,
17951    #[doc = "Receive buffer overflows. This number wraps around as it reaches UINT16_MAX"]
17952    pub rx_overflows: u16,
17953    #[doc = "Remaining free transmit buffer space"]
17954    pub tx_buf: u8,
17955    #[doc = "Remaining free receive buffer space"]
17956    pub rx_buf: u8,
17957}
17958impl LINK_NODE_STATUS_DATA {
17959    pub const ENCODED_LEN: usize = 36usize;
17960    pub const DEFAULT: Self = Self {
17961        timestamp: 0_u64,
17962        tx_rate: 0_u32,
17963        rx_rate: 0_u32,
17964        messages_sent: 0_u32,
17965        messages_received: 0_u32,
17966        messages_lost: 0_u32,
17967        rx_parse_err: 0_u16,
17968        tx_overflows: 0_u16,
17969        rx_overflows: 0_u16,
17970        tx_buf: 0_u8,
17971        rx_buf: 0_u8,
17972    };
17973    #[cfg(feature = "arbitrary")]
17974    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17975        use arbitrary::{Arbitrary, Unstructured};
17976        let mut buf = [0u8; 1024];
17977        rng.fill_bytes(&mut buf);
17978        let mut unstructured = Unstructured::new(&buf);
17979        Self::arbitrary(&mut unstructured).unwrap_or_default()
17980    }
17981}
17982impl Default for LINK_NODE_STATUS_DATA {
17983    fn default() -> Self {
17984        Self::DEFAULT.clone()
17985    }
17986}
17987impl MessageData for LINK_NODE_STATUS_DATA {
17988    type Message = MavMessage;
17989    const ID: u32 = 8u32;
17990    const NAME: &'static str = "LINK_NODE_STATUS";
17991    const EXTRA_CRC: u8 = 117u8;
17992    const ENCODED_LEN: usize = 36usize;
17993    fn deser(
17994        _version: MavlinkVersion,
17995        __input: &[u8],
17996    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17997        let avail_len = __input.len();
17998        let mut payload_buf = [0; Self::ENCODED_LEN];
17999        let mut buf = if avail_len < Self::ENCODED_LEN {
18000            payload_buf[0..avail_len].copy_from_slice(__input);
18001            Bytes::new(&payload_buf)
18002        } else {
18003            Bytes::new(__input)
18004        };
18005        let mut __struct = Self::default();
18006        __struct.timestamp = buf.get_u64_le();
18007        __struct.tx_rate = buf.get_u32_le();
18008        __struct.rx_rate = buf.get_u32_le();
18009        __struct.messages_sent = buf.get_u32_le();
18010        __struct.messages_received = buf.get_u32_le();
18011        __struct.messages_lost = buf.get_u32_le();
18012        __struct.rx_parse_err = buf.get_u16_le();
18013        __struct.tx_overflows = buf.get_u16_le();
18014        __struct.rx_overflows = buf.get_u16_le();
18015        __struct.tx_buf = buf.get_u8();
18016        __struct.rx_buf = buf.get_u8();
18017        Ok(__struct)
18018    }
18019    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18020        let mut __tmp = BytesMut::new(bytes);
18021        #[allow(clippy::absurd_extreme_comparisons)]
18022        #[allow(unused_comparisons)]
18023        if __tmp.remaining() < Self::ENCODED_LEN {
18024            panic!(
18025                "buffer is too small (need {} bytes, but got {})",
18026                Self::ENCODED_LEN,
18027                __tmp.remaining(),
18028            )
18029        }
18030        __tmp.put_u64_le(self.timestamp);
18031        __tmp.put_u32_le(self.tx_rate);
18032        __tmp.put_u32_le(self.rx_rate);
18033        __tmp.put_u32_le(self.messages_sent);
18034        __tmp.put_u32_le(self.messages_received);
18035        __tmp.put_u32_le(self.messages_lost);
18036        __tmp.put_u16_le(self.rx_parse_err);
18037        __tmp.put_u16_le(self.tx_overflows);
18038        __tmp.put_u16_le(self.rx_overflows);
18039        __tmp.put_u8(self.tx_buf);
18040        __tmp.put_u8(self.rx_buf);
18041        if matches!(version, MavlinkVersion::V2) {
18042            let len = __tmp.len();
18043            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18044        } else {
18045            __tmp.len()
18046        }
18047    }
18048}
18049#[doc = "The filtered local position (e.g. fused computer vision and accelerometers). Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
18050#[doc = ""]
18051#[doc = "ID: 32"]
18052#[derive(Debug, Clone, PartialEq)]
18053#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18054#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18055pub struct LOCAL_POSITION_NED_DATA {
18056    #[doc = "Timestamp (time since system boot)."]
18057    pub time_boot_ms: u32,
18058    #[doc = "X Position"]
18059    pub x: f32,
18060    #[doc = "Y Position"]
18061    pub y: f32,
18062    #[doc = "Z Position"]
18063    pub z: f32,
18064    #[doc = "X Speed"]
18065    pub vx: f32,
18066    #[doc = "Y Speed"]
18067    pub vy: f32,
18068    #[doc = "Z Speed"]
18069    pub vz: f32,
18070}
18071impl LOCAL_POSITION_NED_DATA {
18072    pub const ENCODED_LEN: usize = 28usize;
18073    pub const DEFAULT: Self = Self {
18074        time_boot_ms: 0_u32,
18075        x: 0.0_f32,
18076        y: 0.0_f32,
18077        z: 0.0_f32,
18078        vx: 0.0_f32,
18079        vy: 0.0_f32,
18080        vz: 0.0_f32,
18081    };
18082    #[cfg(feature = "arbitrary")]
18083    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18084        use arbitrary::{Arbitrary, Unstructured};
18085        let mut buf = [0u8; 1024];
18086        rng.fill_bytes(&mut buf);
18087        let mut unstructured = Unstructured::new(&buf);
18088        Self::arbitrary(&mut unstructured).unwrap_or_default()
18089    }
18090}
18091impl Default for LOCAL_POSITION_NED_DATA {
18092    fn default() -> Self {
18093        Self::DEFAULT.clone()
18094    }
18095}
18096impl MessageData for LOCAL_POSITION_NED_DATA {
18097    type Message = MavMessage;
18098    const ID: u32 = 32u32;
18099    const NAME: &'static str = "LOCAL_POSITION_NED";
18100    const EXTRA_CRC: u8 = 185u8;
18101    const ENCODED_LEN: usize = 28usize;
18102    fn deser(
18103        _version: MavlinkVersion,
18104        __input: &[u8],
18105    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18106        let avail_len = __input.len();
18107        let mut payload_buf = [0; Self::ENCODED_LEN];
18108        let mut buf = if avail_len < Self::ENCODED_LEN {
18109            payload_buf[0..avail_len].copy_from_slice(__input);
18110            Bytes::new(&payload_buf)
18111        } else {
18112            Bytes::new(__input)
18113        };
18114        let mut __struct = Self::default();
18115        __struct.time_boot_ms = buf.get_u32_le();
18116        __struct.x = buf.get_f32_le();
18117        __struct.y = buf.get_f32_le();
18118        __struct.z = buf.get_f32_le();
18119        __struct.vx = buf.get_f32_le();
18120        __struct.vy = buf.get_f32_le();
18121        __struct.vz = buf.get_f32_le();
18122        Ok(__struct)
18123    }
18124    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18125        let mut __tmp = BytesMut::new(bytes);
18126        #[allow(clippy::absurd_extreme_comparisons)]
18127        #[allow(unused_comparisons)]
18128        if __tmp.remaining() < Self::ENCODED_LEN {
18129            panic!(
18130                "buffer is too small (need {} bytes, but got {})",
18131                Self::ENCODED_LEN,
18132                __tmp.remaining(),
18133            )
18134        }
18135        __tmp.put_u32_le(self.time_boot_ms);
18136        __tmp.put_f32_le(self.x);
18137        __tmp.put_f32_le(self.y);
18138        __tmp.put_f32_le(self.z);
18139        __tmp.put_f32_le(self.vx);
18140        __tmp.put_f32_le(self.vy);
18141        __tmp.put_f32_le(self.vz);
18142        if matches!(version, MavlinkVersion::V2) {
18143            let len = __tmp.len();
18144            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18145        } else {
18146            __tmp.len()
18147        }
18148    }
18149}
18150#[doc = "The filtered local position (e.g. fused computer vision and accelerometers). Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
18151#[doc = ""]
18152#[doc = "ID: 64"]
18153#[derive(Debug, Clone, PartialEq)]
18154#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18155#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18156pub struct LOCAL_POSITION_NED_COV_DATA {
18157    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
18158    pub time_usec: u64,
18159    #[doc = "X Position"]
18160    pub x: f32,
18161    #[doc = "Y Position"]
18162    pub y: f32,
18163    #[doc = "Z Position"]
18164    pub z: f32,
18165    #[doc = "X Speed"]
18166    pub vx: f32,
18167    #[doc = "Y Speed"]
18168    pub vy: f32,
18169    #[doc = "Z Speed"]
18170    pub vz: f32,
18171    #[doc = "X Acceleration"]
18172    pub ax: f32,
18173    #[doc = "Y Acceleration"]
18174    pub ay: f32,
18175    #[doc = "Z Acceleration"]
18176    pub az: f32,
18177    #[doc = "Row-major representation of position, velocity and acceleration 9x9 cross-covariance matrix upper right triangle (states: x, y, z, vx, vy, vz, ax, ay, az; first nine entries are the first ROW, next eight entries are the second row, etc.). If unknown, assign NaN value to first element in the array."]
18178    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
18179    pub covariance: [f32; 45],
18180    #[doc = "Class id of the estimator this estimate originated from."]
18181    pub estimator_type: MavEstimatorType,
18182}
18183impl LOCAL_POSITION_NED_COV_DATA {
18184    pub const ENCODED_LEN: usize = 225usize;
18185    pub const DEFAULT: Self = Self {
18186        time_usec: 0_u64,
18187        x: 0.0_f32,
18188        y: 0.0_f32,
18189        z: 0.0_f32,
18190        vx: 0.0_f32,
18191        vy: 0.0_f32,
18192        vz: 0.0_f32,
18193        ax: 0.0_f32,
18194        ay: 0.0_f32,
18195        az: 0.0_f32,
18196        covariance: [0.0_f32; 45usize],
18197        estimator_type: MavEstimatorType::DEFAULT,
18198    };
18199    #[cfg(feature = "arbitrary")]
18200    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18201        use arbitrary::{Arbitrary, Unstructured};
18202        let mut buf = [0u8; 1024];
18203        rng.fill_bytes(&mut buf);
18204        let mut unstructured = Unstructured::new(&buf);
18205        Self::arbitrary(&mut unstructured).unwrap_or_default()
18206    }
18207}
18208impl Default for LOCAL_POSITION_NED_COV_DATA {
18209    fn default() -> Self {
18210        Self::DEFAULT.clone()
18211    }
18212}
18213impl MessageData for LOCAL_POSITION_NED_COV_DATA {
18214    type Message = MavMessage;
18215    const ID: u32 = 64u32;
18216    const NAME: &'static str = "LOCAL_POSITION_NED_COV";
18217    const EXTRA_CRC: u8 = 191u8;
18218    const ENCODED_LEN: usize = 225usize;
18219    fn deser(
18220        _version: MavlinkVersion,
18221        __input: &[u8],
18222    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18223        let avail_len = __input.len();
18224        let mut payload_buf = [0; Self::ENCODED_LEN];
18225        let mut buf = if avail_len < Self::ENCODED_LEN {
18226            payload_buf[0..avail_len].copy_from_slice(__input);
18227            Bytes::new(&payload_buf)
18228        } else {
18229            Bytes::new(__input)
18230        };
18231        let mut __struct = Self::default();
18232        __struct.time_usec = buf.get_u64_le();
18233        __struct.x = buf.get_f32_le();
18234        __struct.y = buf.get_f32_le();
18235        __struct.z = buf.get_f32_le();
18236        __struct.vx = buf.get_f32_le();
18237        __struct.vy = buf.get_f32_le();
18238        __struct.vz = buf.get_f32_le();
18239        __struct.ax = buf.get_f32_le();
18240        __struct.ay = buf.get_f32_le();
18241        __struct.az = buf.get_f32_le();
18242        for v in &mut __struct.covariance {
18243            let val = buf.get_f32_le();
18244            *v = val;
18245        }
18246        let tmp = buf.get_u8();
18247        __struct.estimator_type =
18248            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
18249                enum_type: "MavEstimatorType",
18250                value: tmp as u32,
18251            })?;
18252        Ok(__struct)
18253    }
18254    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18255        let mut __tmp = BytesMut::new(bytes);
18256        #[allow(clippy::absurd_extreme_comparisons)]
18257        #[allow(unused_comparisons)]
18258        if __tmp.remaining() < Self::ENCODED_LEN {
18259            panic!(
18260                "buffer is too small (need {} bytes, but got {})",
18261                Self::ENCODED_LEN,
18262                __tmp.remaining(),
18263            )
18264        }
18265        __tmp.put_u64_le(self.time_usec);
18266        __tmp.put_f32_le(self.x);
18267        __tmp.put_f32_le(self.y);
18268        __tmp.put_f32_le(self.z);
18269        __tmp.put_f32_le(self.vx);
18270        __tmp.put_f32_le(self.vy);
18271        __tmp.put_f32_le(self.vz);
18272        __tmp.put_f32_le(self.ax);
18273        __tmp.put_f32_le(self.ay);
18274        __tmp.put_f32_le(self.az);
18275        for val in &self.covariance {
18276            __tmp.put_f32_le(*val);
18277        }
18278        __tmp.put_u8(self.estimator_type as u8);
18279        if matches!(version, MavlinkVersion::V2) {
18280            let len = __tmp.len();
18281            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18282        } else {
18283            __tmp.len()
18284        }
18285    }
18286}
18287#[doc = "The offset in X, Y, Z and yaw between the LOCAL_POSITION_NED messages of MAV X and the global coordinate frame in NED coordinates. Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
18288#[doc = ""]
18289#[doc = "ID: 89"]
18290#[derive(Debug, Clone, PartialEq)]
18291#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18292#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18293pub struct LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA {
18294    #[doc = "Timestamp (time since system boot)."]
18295    pub time_boot_ms: u32,
18296    #[doc = "X Position"]
18297    pub x: f32,
18298    #[doc = "Y Position"]
18299    pub y: f32,
18300    #[doc = "Z Position"]
18301    pub z: f32,
18302    #[doc = "Roll"]
18303    pub roll: f32,
18304    #[doc = "Pitch"]
18305    pub pitch: f32,
18306    #[doc = "Yaw"]
18307    pub yaw: f32,
18308}
18309impl LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA {
18310    pub const ENCODED_LEN: usize = 28usize;
18311    pub const DEFAULT: Self = Self {
18312        time_boot_ms: 0_u32,
18313        x: 0.0_f32,
18314        y: 0.0_f32,
18315        z: 0.0_f32,
18316        roll: 0.0_f32,
18317        pitch: 0.0_f32,
18318        yaw: 0.0_f32,
18319    };
18320    #[cfg(feature = "arbitrary")]
18321    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18322        use arbitrary::{Arbitrary, Unstructured};
18323        let mut buf = [0u8; 1024];
18324        rng.fill_bytes(&mut buf);
18325        let mut unstructured = Unstructured::new(&buf);
18326        Self::arbitrary(&mut unstructured).unwrap_or_default()
18327    }
18328}
18329impl Default for LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA {
18330    fn default() -> Self {
18331        Self::DEFAULT.clone()
18332    }
18333}
18334impl MessageData for LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA {
18335    type Message = MavMessage;
18336    const ID: u32 = 89u32;
18337    const NAME: &'static str = "LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET";
18338    const EXTRA_CRC: u8 = 231u8;
18339    const ENCODED_LEN: usize = 28usize;
18340    fn deser(
18341        _version: MavlinkVersion,
18342        __input: &[u8],
18343    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18344        let avail_len = __input.len();
18345        let mut payload_buf = [0; Self::ENCODED_LEN];
18346        let mut buf = if avail_len < Self::ENCODED_LEN {
18347            payload_buf[0..avail_len].copy_from_slice(__input);
18348            Bytes::new(&payload_buf)
18349        } else {
18350            Bytes::new(__input)
18351        };
18352        let mut __struct = Self::default();
18353        __struct.time_boot_ms = buf.get_u32_le();
18354        __struct.x = buf.get_f32_le();
18355        __struct.y = buf.get_f32_le();
18356        __struct.z = buf.get_f32_le();
18357        __struct.roll = buf.get_f32_le();
18358        __struct.pitch = buf.get_f32_le();
18359        __struct.yaw = buf.get_f32_le();
18360        Ok(__struct)
18361    }
18362    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18363        let mut __tmp = BytesMut::new(bytes);
18364        #[allow(clippy::absurd_extreme_comparisons)]
18365        #[allow(unused_comparisons)]
18366        if __tmp.remaining() < Self::ENCODED_LEN {
18367            panic!(
18368                "buffer is too small (need {} bytes, but got {})",
18369                Self::ENCODED_LEN,
18370                __tmp.remaining(),
18371            )
18372        }
18373        __tmp.put_u32_le(self.time_boot_ms);
18374        __tmp.put_f32_le(self.x);
18375        __tmp.put_f32_le(self.y);
18376        __tmp.put_f32_le(self.z);
18377        __tmp.put_f32_le(self.roll);
18378        __tmp.put_f32_le(self.pitch);
18379        __tmp.put_f32_le(self.yaw);
18380        if matches!(version, MavlinkVersion::V2) {
18381            let len = __tmp.len();
18382            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18383        } else {
18384            __tmp.len()
18385        }
18386    }
18387}
18388#[doc = "An ack for a LOGGING_DATA_ACKED message."]
18389#[doc = ""]
18390#[doc = "ID: 268"]
18391#[derive(Debug, Clone, PartialEq)]
18392#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18393#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18394pub struct LOGGING_ACK_DATA {
18395    #[doc = "sequence number (must match the one in LOGGING_DATA_ACKED)"]
18396    pub sequence: u16,
18397    #[doc = "system ID of the target"]
18398    pub target_system: u8,
18399    #[doc = "component ID of the target"]
18400    pub target_component: u8,
18401}
18402impl LOGGING_ACK_DATA {
18403    pub const ENCODED_LEN: usize = 4usize;
18404    pub const DEFAULT: Self = Self {
18405        sequence: 0_u16,
18406        target_system: 0_u8,
18407        target_component: 0_u8,
18408    };
18409    #[cfg(feature = "arbitrary")]
18410    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18411        use arbitrary::{Arbitrary, Unstructured};
18412        let mut buf = [0u8; 1024];
18413        rng.fill_bytes(&mut buf);
18414        let mut unstructured = Unstructured::new(&buf);
18415        Self::arbitrary(&mut unstructured).unwrap_or_default()
18416    }
18417}
18418impl Default for LOGGING_ACK_DATA {
18419    fn default() -> Self {
18420        Self::DEFAULT.clone()
18421    }
18422}
18423impl MessageData for LOGGING_ACK_DATA {
18424    type Message = MavMessage;
18425    const ID: u32 = 268u32;
18426    const NAME: &'static str = "LOGGING_ACK";
18427    const EXTRA_CRC: u8 = 14u8;
18428    const ENCODED_LEN: usize = 4usize;
18429    fn deser(
18430        _version: MavlinkVersion,
18431        __input: &[u8],
18432    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18433        let avail_len = __input.len();
18434        let mut payload_buf = [0; Self::ENCODED_LEN];
18435        let mut buf = if avail_len < Self::ENCODED_LEN {
18436            payload_buf[0..avail_len].copy_from_slice(__input);
18437            Bytes::new(&payload_buf)
18438        } else {
18439            Bytes::new(__input)
18440        };
18441        let mut __struct = Self::default();
18442        __struct.sequence = buf.get_u16_le();
18443        __struct.target_system = buf.get_u8();
18444        __struct.target_component = buf.get_u8();
18445        Ok(__struct)
18446    }
18447    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18448        let mut __tmp = BytesMut::new(bytes);
18449        #[allow(clippy::absurd_extreme_comparisons)]
18450        #[allow(unused_comparisons)]
18451        if __tmp.remaining() < Self::ENCODED_LEN {
18452            panic!(
18453                "buffer is too small (need {} bytes, but got {})",
18454                Self::ENCODED_LEN,
18455                __tmp.remaining(),
18456            )
18457        }
18458        __tmp.put_u16_le(self.sequence);
18459        __tmp.put_u8(self.target_system);
18460        __tmp.put_u8(self.target_component);
18461        if matches!(version, MavlinkVersion::V2) {
18462            let len = __tmp.len();
18463            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18464        } else {
18465            __tmp.len()
18466        }
18467    }
18468}
18469#[doc = "A message containing logged data (see also MAV_CMD_LOGGING_START)."]
18470#[doc = ""]
18471#[doc = "ID: 266"]
18472#[derive(Debug, Clone, PartialEq)]
18473#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18474#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18475pub struct LOGGING_DATA_DATA {
18476    #[doc = "sequence number (can wrap)"]
18477    pub sequence: u16,
18478    #[doc = "system ID of the target"]
18479    pub target_system: u8,
18480    #[doc = "component ID of the target"]
18481    pub target_component: u8,
18482    #[doc = "data length"]
18483    pub length: u8,
18484    #[doc = "offset into data where first message starts. This can be used for recovery, when a previous message got lost (set to UINT8_MAX if no start exists)."]
18485    pub first_message_offset: u8,
18486    #[doc = "logged data"]
18487    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
18488    pub data: [u8; 249],
18489}
18490impl LOGGING_DATA_DATA {
18491    pub const ENCODED_LEN: usize = 255usize;
18492    pub const DEFAULT: Self = Self {
18493        sequence: 0_u16,
18494        target_system: 0_u8,
18495        target_component: 0_u8,
18496        length: 0_u8,
18497        first_message_offset: 0_u8,
18498        data: [0_u8; 249usize],
18499    };
18500    #[cfg(feature = "arbitrary")]
18501    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18502        use arbitrary::{Arbitrary, Unstructured};
18503        let mut buf = [0u8; 1024];
18504        rng.fill_bytes(&mut buf);
18505        let mut unstructured = Unstructured::new(&buf);
18506        Self::arbitrary(&mut unstructured).unwrap_or_default()
18507    }
18508}
18509impl Default for LOGGING_DATA_DATA {
18510    fn default() -> Self {
18511        Self::DEFAULT.clone()
18512    }
18513}
18514impl MessageData for LOGGING_DATA_DATA {
18515    type Message = MavMessage;
18516    const ID: u32 = 266u32;
18517    const NAME: &'static str = "LOGGING_DATA";
18518    const EXTRA_CRC: u8 = 193u8;
18519    const ENCODED_LEN: usize = 255usize;
18520    fn deser(
18521        _version: MavlinkVersion,
18522        __input: &[u8],
18523    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18524        let avail_len = __input.len();
18525        let mut payload_buf = [0; Self::ENCODED_LEN];
18526        let mut buf = if avail_len < Self::ENCODED_LEN {
18527            payload_buf[0..avail_len].copy_from_slice(__input);
18528            Bytes::new(&payload_buf)
18529        } else {
18530            Bytes::new(__input)
18531        };
18532        let mut __struct = Self::default();
18533        __struct.sequence = buf.get_u16_le();
18534        __struct.target_system = buf.get_u8();
18535        __struct.target_component = buf.get_u8();
18536        __struct.length = buf.get_u8();
18537        __struct.first_message_offset = buf.get_u8();
18538        for v in &mut __struct.data {
18539            let val = buf.get_u8();
18540            *v = val;
18541        }
18542        Ok(__struct)
18543    }
18544    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18545        let mut __tmp = BytesMut::new(bytes);
18546        #[allow(clippy::absurd_extreme_comparisons)]
18547        #[allow(unused_comparisons)]
18548        if __tmp.remaining() < Self::ENCODED_LEN {
18549            panic!(
18550                "buffer is too small (need {} bytes, but got {})",
18551                Self::ENCODED_LEN,
18552                __tmp.remaining(),
18553            )
18554        }
18555        __tmp.put_u16_le(self.sequence);
18556        __tmp.put_u8(self.target_system);
18557        __tmp.put_u8(self.target_component);
18558        __tmp.put_u8(self.length);
18559        __tmp.put_u8(self.first_message_offset);
18560        for val in &self.data {
18561            __tmp.put_u8(*val);
18562        }
18563        if matches!(version, MavlinkVersion::V2) {
18564            let len = __tmp.len();
18565            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18566        } else {
18567            __tmp.len()
18568        }
18569    }
18570}
18571#[doc = "A message containing logged data which requires a LOGGING_ACK to be sent back."]
18572#[doc = ""]
18573#[doc = "ID: 267"]
18574#[derive(Debug, Clone, PartialEq)]
18575#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18576#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18577pub struct LOGGING_DATA_ACKED_DATA {
18578    #[doc = "sequence number (can wrap)"]
18579    pub sequence: u16,
18580    #[doc = "system ID of the target"]
18581    pub target_system: u8,
18582    #[doc = "component ID of the target"]
18583    pub target_component: u8,
18584    #[doc = "data length"]
18585    pub length: u8,
18586    #[doc = "offset into data where first message starts. This can be used for recovery, when a previous message got lost (set to UINT8_MAX if no start exists)."]
18587    pub first_message_offset: u8,
18588    #[doc = "logged data"]
18589    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
18590    pub data: [u8; 249],
18591}
18592impl LOGGING_DATA_ACKED_DATA {
18593    pub const ENCODED_LEN: usize = 255usize;
18594    pub const DEFAULT: Self = Self {
18595        sequence: 0_u16,
18596        target_system: 0_u8,
18597        target_component: 0_u8,
18598        length: 0_u8,
18599        first_message_offset: 0_u8,
18600        data: [0_u8; 249usize],
18601    };
18602    #[cfg(feature = "arbitrary")]
18603    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18604        use arbitrary::{Arbitrary, Unstructured};
18605        let mut buf = [0u8; 1024];
18606        rng.fill_bytes(&mut buf);
18607        let mut unstructured = Unstructured::new(&buf);
18608        Self::arbitrary(&mut unstructured).unwrap_or_default()
18609    }
18610}
18611impl Default for LOGGING_DATA_ACKED_DATA {
18612    fn default() -> Self {
18613        Self::DEFAULT.clone()
18614    }
18615}
18616impl MessageData for LOGGING_DATA_ACKED_DATA {
18617    type Message = MavMessage;
18618    const ID: u32 = 267u32;
18619    const NAME: &'static str = "LOGGING_DATA_ACKED";
18620    const EXTRA_CRC: u8 = 35u8;
18621    const ENCODED_LEN: usize = 255usize;
18622    fn deser(
18623        _version: MavlinkVersion,
18624        __input: &[u8],
18625    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18626        let avail_len = __input.len();
18627        let mut payload_buf = [0; Self::ENCODED_LEN];
18628        let mut buf = if avail_len < Self::ENCODED_LEN {
18629            payload_buf[0..avail_len].copy_from_slice(__input);
18630            Bytes::new(&payload_buf)
18631        } else {
18632            Bytes::new(__input)
18633        };
18634        let mut __struct = Self::default();
18635        __struct.sequence = buf.get_u16_le();
18636        __struct.target_system = buf.get_u8();
18637        __struct.target_component = buf.get_u8();
18638        __struct.length = buf.get_u8();
18639        __struct.first_message_offset = buf.get_u8();
18640        for v in &mut __struct.data {
18641            let val = buf.get_u8();
18642            *v = val;
18643        }
18644        Ok(__struct)
18645    }
18646    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18647        let mut __tmp = BytesMut::new(bytes);
18648        #[allow(clippy::absurd_extreme_comparisons)]
18649        #[allow(unused_comparisons)]
18650        if __tmp.remaining() < Self::ENCODED_LEN {
18651            panic!(
18652                "buffer is too small (need {} bytes, but got {})",
18653                Self::ENCODED_LEN,
18654                __tmp.remaining(),
18655            )
18656        }
18657        __tmp.put_u16_le(self.sequence);
18658        __tmp.put_u8(self.target_system);
18659        __tmp.put_u8(self.target_component);
18660        __tmp.put_u8(self.length);
18661        __tmp.put_u8(self.first_message_offset);
18662        for val in &self.data {
18663            __tmp.put_u8(*val);
18664        }
18665        if matches!(version, MavlinkVersion::V2) {
18666            let len = __tmp.len();
18667            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18668        } else {
18669            __tmp.len()
18670        }
18671    }
18672}
18673#[doc = "Reply to LOG_REQUEST_DATA."]
18674#[doc = ""]
18675#[doc = "ID: 120"]
18676#[derive(Debug, Clone, PartialEq)]
18677#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18678#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18679pub struct LOG_DATA_DATA {
18680    #[doc = "Offset into the log"]
18681    pub ofs: u32,
18682    #[doc = "Log id (from LOG_ENTRY reply)"]
18683    pub id: u16,
18684    #[doc = "Number of bytes (zero for end of log)"]
18685    pub count: u8,
18686    #[doc = "log data"]
18687    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
18688    pub data: [u8; 90],
18689}
18690impl LOG_DATA_DATA {
18691    pub const ENCODED_LEN: usize = 97usize;
18692    pub const DEFAULT: Self = Self {
18693        ofs: 0_u32,
18694        id: 0_u16,
18695        count: 0_u8,
18696        data: [0_u8; 90usize],
18697    };
18698    #[cfg(feature = "arbitrary")]
18699    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18700        use arbitrary::{Arbitrary, Unstructured};
18701        let mut buf = [0u8; 1024];
18702        rng.fill_bytes(&mut buf);
18703        let mut unstructured = Unstructured::new(&buf);
18704        Self::arbitrary(&mut unstructured).unwrap_or_default()
18705    }
18706}
18707impl Default for LOG_DATA_DATA {
18708    fn default() -> Self {
18709        Self::DEFAULT.clone()
18710    }
18711}
18712impl MessageData for LOG_DATA_DATA {
18713    type Message = MavMessage;
18714    const ID: u32 = 120u32;
18715    const NAME: &'static str = "LOG_DATA";
18716    const EXTRA_CRC: u8 = 134u8;
18717    const ENCODED_LEN: usize = 97usize;
18718    fn deser(
18719        _version: MavlinkVersion,
18720        __input: &[u8],
18721    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18722        let avail_len = __input.len();
18723        let mut payload_buf = [0; Self::ENCODED_LEN];
18724        let mut buf = if avail_len < Self::ENCODED_LEN {
18725            payload_buf[0..avail_len].copy_from_slice(__input);
18726            Bytes::new(&payload_buf)
18727        } else {
18728            Bytes::new(__input)
18729        };
18730        let mut __struct = Self::default();
18731        __struct.ofs = buf.get_u32_le();
18732        __struct.id = buf.get_u16_le();
18733        __struct.count = buf.get_u8();
18734        for v in &mut __struct.data {
18735            let val = buf.get_u8();
18736            *v = val;
18737        }
18738        Ok(__struct)
18739    }
18740    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18741        let mut __tmp = BytesMut::new(bytes);
18742        #[allow(clippy::absurd_extreme_comparisons)]
18743        #[allow(unused_comparisons)]
18744        if __tmp.remaining() < Self::ENCODED_LEN {
18745            panic!(
18746                "buffer is too small (need {} bytes, but got {})",
18747                Self::ENCODED_LEN,
18748                __tmp.remaining(),
18749            )
18750        }
18751        __tmp.put_u32_le(self.ofs);
18752        __tmp.put_u16_le(self.id);
18753        __tmp.put_u8(self.count);
18754        for val in &self.data {
18755            __tmp.put_u8(*val);
18756        }
18757        if matches!(version, MavlinkVersion::V2) {
18758            let len = __tmp.len();
18759            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18760        } else {
18761            __tmp.len()
18762        }
18763    }
18764}
18765#[doc = "Reply to LOG_REQUEST_LIST."]
18766#[doc = ""]
18767#[doc = "ID: 118"]
18768#[derive(Debug, Clone, PartialEq)]
18769#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18770#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18771pub struct LOG_ENTRY_DATA {
18772    #[doc = "UTC timestamp of log since 1970, or 0 if not available"]
18773    pub time_utc: u32,
18774    #[doc = "Size of the log (may be approximate)"]
18775    pub size: u32,
18776    #[doc = "Log id"]
18777    pub id: u16,
18778    #[doc = "Total number of logs"]
18779    pub num_logs: u16,
18780    #[doc = "High log number"]
18781    pub last_log_num: u16,
18782}
18783impl LOG_ENTRY_DATA {
18784    pub const ENCODED_LEN: usize = 14usize;
18785    pub const DEFAULT: Self = Self {
18786        time_utc: 0_u32,
18787        size: 0_u32,
18788        id: 0_u16,
18789        num_logs: 0_u16,
18790        last_log_num: 0_u16,
18791    };
18792    #[cfg(feature = "arbitrary")]
18793    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18794        use arbitrary::{Arbitrary, Unstructured};
18795        let mut buf = [0u8; 1024];
18796        rng.fill_bytes(&mut buf);
18797        let mut unstructured = Unstructured::new(&buf);
18798        Self::arbitrary(&mut unstructured).unwrap_or_default()
18799    }
18800}
18801impl Default for LOG_ENTRY_DATA {
18802    fn default() -> Self {
18803        Self::DEFAULT.clone()
18804    }
18805}
18806impl MessageData for LOG_ENTRY_DATA {
18807    type Message = MavMessage;
18808    const ID: u32 = 118u32;
18809    const NAME: &'static str = "LOG_ENTRY";
18810    const EXTRA_CRC: u8 = 56u8;
18811    const ENCODED_LEN: usize = 14usize;
18812    fn deser(
18813        _version: MavlinkVersion,
18814        __input: &[u8],
18815    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18816        let avail_len = __input.len();
18817        let mut payload_buf = [0; Self::ENCODED_LEN];
18818        let mut buf = if avail_len < Self::ENCODED_LEN {
18819            payload_buf[0..avail_len].copy_from_slice(__input);
18820            Bytes::new(&payload_buf)
18821        } else {
18822            Bytes::new(__input)
18823        };
18824        let mut __struct = Self::default();
18825        __struct.time_utc = buf.get_u32_le();
18826        __struct.size = buf.get_u32_le();
18827        __struct.id = buf.get_u16_le();
18828        __struct.num_logs = buf.get_u16_le();
18829        __struct.last_log_num = buf.get_u16_le();
18830        Ok(__struct)
18831    }
18832    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18833        let mut __tmp = BytesMut::new(bytes);
18834        #[allow(clippy::absurd_extreme_comparisons)]
18835        #[allow(unused_comparisons)]
18836        if __tmp.remaining() < Self::ENCODED_LEN {
18837            panic!(
18838                "buffer is too small (need {} bytes, but got {})",
18839                Self::ENCODED_LEN,
18840                __tmp.remaining(),
18841            )
18842        }
18843        __tmp.put_u32_le(self.time_utc);
18844        __tmp.put_u32_le(self.size);
18845        __tmp.put_u16_le(self.id);
18846        __tmp.put_u16_le(self.num_logs);
18847        __tmp.put_u16_le(self.last_log_num);
18848        if matches!(version, MavlinkVersion::V2) {
18849            let len = __tmp.len();
18850            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18851        } else {
18852            __tmp.len()
18853        }
18854    }
18855}
18856#[doc = "Erase all logs."]
18857#[doc = ""]
18858#[doc = "ID: 121"]
18859#[derive(Debug, Clone, PartialEq)]
18860#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18861#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18862pub struct LOG_ERASE_DATA {
18863    #[doc = "System ID"]
18864    pub target_system: u8,
18865    #[doc = "Component ID"]
18866    pub target_component: u8,
18867}
18868impl LOG_ERASE_DATA {
18869    pub const ENCODED_LEN: usize = 2usize;
18870    pub const DEFAULT: Self = Self {
18871        target_system: 0_u8,
18872        target_component: 0_u8,
18873    };
18874    #[cfg(feature = "arbitrary")]
18875    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18876        use arbitrary::{Arbitrary, Unstructured};
18877        let mut buf = [0u8; 1024];
18878        rng.fill_bytes(&mut buf);
18879        let mut unstructured = Unstructured::new(&buf);
18880        Self::arbitrary(&mut unstructured).unwrap_or_default()
18881    }
18882}
18883impl Default for LOG_ERASE_DATA {
18884    fn default() -> Self {
18885        Self::DEFAULT.clone()
18886    }
18887}
18888impl MessageData for LOG_ERASE_DATA {
18889    type Message = MavMessage;
18890    const ID: u32 = 121u32;
18891    const NAME: &'static str = "LOG_ERASE";
18892    const EXTRA_CRC: u8 = 237u8;
18893    const ENCODED_LEN: usize = 2usize;
18894    fn deser(
18895        _version: MavlinkVersion,
18896        __input: &[u8],
18897    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18898        let avail_len = __input.len();
18899        let mut payload_buf = [0; Self::ENCODED_LEN];
18900        let mut buf = if avail_len < Self::ENCODED_LEN {
18901            payload_buf[0..avail_len].copy_from_slice(__input);
18902            Bytes::new(&payload_buf)
18903        } else {
18904            Bytes::new(__input)
18905        };
18906        let mut __struct = Self::default();
18907        __struct.target_system = buf.get_u8();
18908        __struct.target_component = buf.get_u8();
18909        Ok(__struct)
18910    }
18911    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18912        let mut __tmp = BytesMut::new(bytes);
18913        #[allow(clippy::absurd_extreme_comparisons)]
18914        #[allow(unused_comparisons)]
18915        if __tmp.remaining() < Self::ENCODED_LEN {
18916            panic!(
18917                "buffer is too small (need {} bytes, but got {})",
18918                Self::ENCODED_LEN,
18919                __tmp.remaining(),
18920            )
18921        }
18922        __tmp.put_u8(self.target_system);
18923        __tmp.put_u8(self.target_component);
18924        if matches!(version, MavlinkVersion::V2) {
18925            let len = __tmp.len();
18926            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18927        } else {
18928            __tmp.len()
18929        }
18930    }
18931}
18932#[doc = "Request a chunk of a log."]
18933#[doc = ""]
18934#[doc = "ID: 119"]
18935#[derive(Debug, Clone, PartialEq)]
18936#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18937#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18938pub struct LOG_REQUEST_DATA_DATA {
18939    #[doc = "Offset into the log"]
18940    pub ofs: u32,
18941    #[doc = "Number of bytes"]
18942    pub count: u32,
18943    #[doc = "Log id (from LOG_ENTRY reply)"]
18944    pub id: u16,
18945    #[doc = "System ID"]
18946    pub target_system: u8,
18947    #[doc = "Component ID"]
18948    pub target_component: u8,
18949}
18950impl LOG_REQUEST_DATA_DATA {
18951    pub const ENCODED_LEN: usize = 12usize;
18952    pub const DEFAULT: Self = Self {
18953        ofs: 0_u32,
18954        count: 0_u32,
18955        id: 0_u16,
18956        target_system: 0_u8,
18957        target_component: 0_u8,
18958    };
18959    #[cfg(feature = "arbitrary")]
18960    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18961        use arbitrary::{Arbitrary, Unstructured};
18962        let mut buf = [0u8; 1024];
18963        rng.fill_bytes(&mut buf);
18964        let mut unstructured = Unstructured::new(&buf);
18965        Self::arbitrary(&mut unstructured).unwrap_or_default()
18966    }
18967}
18968impl Default for LOG_REQUEST_DATA_DATA {
18969    fn default() -> Self {
18970        Self::DEFAULT.clone()
18971    }
18972}
18973impl MessageData for LOG_REQUEST_DATA_DATA {
18974    type Message = MavMessage;
18975    const ID: u32 = 119u32;
18976    const NAME: &'static str = "LOG_REQUEST_DATA";
18977    const EXTRA_CRC: u8 = 116u8;
18978    const ENCODED_LEN: usize = 12usize;
18979    fn deser(
18980        _version: MavlinkVersion,
18981        __input: &[u8],
18982    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18983        let avail_len = __input.len();
18984        let mut payload_buf = [0; Self::ENCODED_LEN];
18985        let mut buf = if avail_len < Self::ENCODED_LEN {
18986            payload_buf[0..avail_len].copy_from_slice(__input);
18987            Bytes::new(&payload_buf)
18988        } else {
18989            Bytes::new(__input)
18990        };
18991        let mut __struct = Self::default();
18992        __struct.ofs = buf.get_u32_le();
18993        __struct.count = buf.get_u32_le();
18994        __struct.id = buf.get_u16_le();
18995        __struct.target_system = buf.get_u8();
18996        __struct.target_component = buf.get_u8();
18997        Ok(__struct)
18998    }
18999    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19000        let mut __tmp = BytesMut::new(bytes);
19001        #[allow(clippy::absurd_extreme_comparisons)]
19002        #[allow(unused_comparisons)]
19003        if __tmp.remaining() < Self::ENCODED_LEN {
19004            panic!(
19005                "buffer is too small (need {} bytes, but got {})",
19006                Self::ENCODED_LEN,
19007                __tmp.remaining(),
19008            )
19009        }
19010        __tmp.put_u32_le(self.ofs);
19011        __tmp.put_u32_le(self.count);
19012        __tmp.put_u16_le(self.id);
19013        __tmp.put_u8(self.target_system);
19014        __tmp.put_u8(self.target_component);
19015        if matches!(version, MavlinkVersion::V2) {
19016            let len = __tmp.len();
19017            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19018        } else {
19019            __tmp.len()
19020        }
19021    }
19022}
19023#[doc = "Stop log transfer and resume normal logging."]
19024#[doc = ""]
19025#[doc = "ID: 122"]
19026#[derive(Debug, Clone, PartialEq)]
19027#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19028#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19029pub struct LOG_REQUEST_END_DATA {
19030    #[doc = "System ID"]
19031    pub target_system: u8,
19032    #[doc = "Component ID"]
19033    pub target_component: u8,
19034}
19035impl LOG_REQUEST_END_DATA {
19036    pub const ENCODED_LEN: usize = 2usize;
19037    pub const DEFAULT: Self = Self {
19038        target_system: 0_u8,
19039        target_component: 0_u8,
19040    };
19041    #[cfg(feature = "arbitrary")]
19042    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19043        use arbitrary::{Arbitrary, Unstructured};
19044        let mut buf = [0u8; 1024];
19045        rng.fill_bytes(&mut buf);
19046        let mut unstructured = Unstructured::new(&buf);
19047        Self::arbitrary(&mut unstructured).unwrap_or_default()
19048    }
19049}
19050impl Default for LOG_REQUEST_END_DATA {
19051    fn default() -> Self {
19052        Self::DEFAULT.clone()
19053    }
19054}
19055impl MessageData for LOG_REQUEST_END_DATA {
19056    type Message = MavMessage;
19057    const ID: u32 = 122u32;
19058    const NAME: &'static str = "LOG_REQUEST_END";
19059    const EXTRA_CRC: u8 = 203u8;
19060    const ENCODED_LEN: usize = 2usize;
19061    fn deser(
19062        _version: MavlinkVersion,
19063        __input: &[u8],
19064    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19065        let avail_len = __input.len();
19066        let mut payload_buf = [0; Self::ENCODED_LEN];
19067        let mut buf = if avail_len < Self::ENCODED_LEN {
19068            payload_buf[0..avail_len].copy_from_slice(__input);
19069            Bytes::new(&payload_buf)
19070        } else {
19071            Bytes::new(__input)
19072        };
19073        let mut __struct = Self::default();
19074        __struct.target_system = buf.get_u8();
19075        __struct.target_component = buf.get_u8();
19076        Ok(__struct)
19077    }
19078    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19079        let mut __tmp = BytesMut::new(bytes);
19080        #[allow(clippy::absurd_extreme_comparisons)]
19081        #[allow(unused_comparisons)]
19082        if __tmp.remaining() < Self::ENCODED_LEN {
19083            panic!(
19084                "buffer is too small (need {} bytes, but got {})",
19085                Self::ENCODED_LEN,
19086                __tmp.remaining(),
19087            )
19088        }
19089        __tmp.put_u8(self.target_system);
19090        __tmp.put_u8(self.target_component);
19091        if matches!(version, MavlinkVersion::V2) {
19092            let len = __tmp.len();
19093            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19094        } else {
19095            __tmp.len()
19096        }
19097    }
19098}
19099#[doc = "Request a list of available logs. On some systems calling this may stop on-board logging until LOG_REQUEST_END is called. If there are no log files available this request shall be answered with one LOG_ENTRY message with id = 0 and num_logs = 0."]
19100#[doc = ""]
19101#[doc = "ID: 117"]
19102#[derive(Debug, Clone, PartialEq)]
19103#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19104#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19105pub struct LOG_REQUEST_LIST_DATA {
19106    #[doc = "First log id (0 for first available)"]
19107    pub start: u16,
19108    #[doc = "Last log id (0xffff for last available)"]
19109    pub end: u16,
19110    #[doc = "System ID"]
19111    pub target_system: u8,
19112    #[doc = "Component ID"]
19113    pub target_component: u8,
19114}
19115impl LOG_REQUEST_LIST_DATA {
19116    pub const ENCODED_LEN: usize = 6usize;
19117    pub const DEFAULT: Self = Self {
19118        start: 0_u16,
19119        end: 0_u16,
19120        target_system: 0_u8,
19121        target_component: 0_u8,
19122    };
19123    #[cfg(feature = "arbitrary")]
19124    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19125        use arbitrary::{Arbitrary, Unstructured};
19126        let mut buf = [0u8; 1024];
19127        rng.fill_bytes(&mut buf);
19128        let mut unstructured = Unstructured::new(&buf);
19129        Self::arbitrary(&mut unstructured).unwrap_or_default()
19130    }
19131}
19132impl Default for LOG_REQUEST_LIST_DATA {
19133    fn default() -> Self {
19134        Self::DEFAULT.clone()
19135    }
19136}
19137impl MessageData for LOG_REQUEST_LIST_DATA {
19138    type Message = MavMessage;
19139    const ID: u32 = 117u32;
19140    const NAME: &'static str = "LOG_REQUEST_LIST";
19141    const EXTRA_CRC: u8 = 128u8;
19142    const ENCODED_LEN: usize = 6usize;
19143    fn deser(
19144        _version: MavlinkVersion,
19145        __input: &[u8],
19146    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19147        let avail_len = __input.len();
19148        let mut payload_buf = [0; Self::ENCODED_LEN];
19149        let mut buf = if avail_len < Self::ENCODED_LEN {
19150            payload_buf[0..avail_len].copy_from_slice(__input);
19151            Bytes::new(&payload_buf)
19152        } else {
19153            Bytes::new(__input)
19154        };
19155        let mut __struct = Self::default();
19156        __struct.start = buf.get_u16_le();
19157        __struct.end = buf.get_u16_le();
19158        __struct.target_system = buf.get_u8();
19159        __struct.target_component = buf.get_u8();
19160        Ok(__struct)
19161    }
19162    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19163        let mut __tmp = BytesMut::new(bytes);
19164        #[allow(clippy::absurd_extreme_comparisons)]
19165        #[allow(unused_comparisons)]
19166        if __tmp.remaining() < Self::ENCODED_LEN {
19167            panic!(
19168                "buffer is too small (need {} bytes, but got {})",
19169                Self::ENCODED_LEN,
19170                __tmp.remaining(),
19171            )
19172        }
19173        __tmp.put_u16_le(self.start);
19174        __tmp.put_u16_le(self.end);
19175        __tmp.put_u8(self.target_system);
19176        __tmp.put_u8(self.target_component);
19177        if matches!(version, MavlinkVersion::V2) {
19178            let len = __tmp.len();
19179            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19180        } else {
19181            __tmp.len()
19182        }
19183    }
19184}
19185#[doc = "Reports results of completed compass calibration. Sent until MAG_CAL_ACK received."]
19186#[doc = ""]
19187#[doc = "ID: 192"]
19188#[derive(Debug, Clone, PartialEq)]
19189#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19190#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19191pub struct MAG_CAL_REPORT_DATA {
19192    #[doc = "RMS milligauss residuals."]
19193    pub fitness: f32,
19194    #[doc = "X offset."]
19195    pub ofs_x: f32,
19196    #[doc = "Y offset."]
19197    pub ofs_y: f32,
19198    #[doc = "Z offset."]
19199    pub ofs_z: f32,
19200    #[doc = "X diagonal (matrix 11)."]
19201    pub diag_x: f32,
19202    #[doc = "Y diagonal (matrix 22)."]
19203    pub diag_y: f32,
19204    #[doc = "Z diagonal (matrix 33)."]
19205    pub diag_z: f32,
19206    #[doc = "X off-diagonal (matrix 12 and 21)."]
19207    pub offdiag_x: f32,
19208    #[doc = "Y off-diagonal (matrix 13 and 31)."]
19209    pub offdiag_y: f32,
19210    #[doc = "Z off-diagonal (matrix 32 and 23)."]
19211    pub offdiag_z: f32,
19212    #[doc = "Compass being calibrated."]
19213    pub compass_id: u8,
19214    #[doc = "Bitmask of compasses being calibrated."]
19215    pub cal_mask: u8,
19216    #[doc = "Calibration Status."]
19217    pub cal_status: MagCalStatus,
19218    #[doc = "0=requires a MAV_CMD_DO_ACCEPT_MAG_CAL, 1=saved to parameters."]
19219    pub autosaved: u8,
19220    #[doc = "Confidence in orientation (higher is better)."]
19221    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19222    pub orientation_confidence: f32,
19223    #[doc = "orientation before calibration."]
19224    #[cfg_attr(feature = "serde", serde(default))]
19225    pub old_orientation: MavSensorOrientation,
19226    #[doc = "orientation after calibration."]
19227    #[cfg_attr(feature = "serde", serde(default))]
19228    pub new_orientation: MavSensorOrientation,
19229    #[doc = "field radius correction factor"]
19230    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19231    pub scale_factor: f32,
19232}
19233impl MAG_CAL_REPORT_DATA {
19234    pub const ENCODED_LEN: usize = 54usize;
19235    pub const DEFAULT: Self = Self {
19236        fitness: 0.0_f32,
19237        ofs_x: 0.0_f32,
19238        ofs_y: 0.0_f32,
19239        ofs_z: 0.0_f32,
19240        diag_x: 0.0_f32,
19241        diag_y: 0.0_f32,
19242        diag_z: 0.0_f32,
19243        offdiag_x: 0.0_f32,
19244        offdiag_y: 0.0_f32,
19245        offdiag_z: 0.0_f32,
19246        compass_id: 0_u8,
19247        cal_mask: 0_u8,
19248        cal_status: MagCalStatus::DEFAULT,
19249        autosaved: 0_u8,
19250        orientation_confidence: 0.0_f32,
19251        old_orientation: MavSensorOrientation::DEFAULT,
19252        new_orientation: MavSensorOrientation::DEFAULT,
19253        scale_factor: 0.0_f32,
19254    };
19255    #[cfg(feature = "arbitrary")]
19256    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19257        use arbitrary::{Arbitrary, Unstructured};
19258        let mut buf = [0u8; 1024];
19259        rng.fill_bytes(&mut buf);
19260        let mut unstructured = Unstructured::new(&buf);
19261        Self::arbitrary(&mut unstructured).unwrap_or_default()
19262    }
19263}
19264impl Default for MAG_CAL_REPORT_DATA {
19265    fn default() -> Self {
19266        Self::DEFAULT.clone()
19267    }
19268}
19269impl MessageData for MAG_CAL_REPORT_DATA {
19270    type Message = MavMessage;
19271    const ID: u32 = 192u32;
19272    const NAME: &'static str = "MAG_CAL_REPORT";
19273    const EXTRA_CRC: u8 = 36u8;
19274    const ENCODED_LEN: usize = 54usize;
19275    fn deser(
19276        _version: MavlinkVersion,
19277        __input: &[u8],
19278    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19279        let avail_len = __input.len();
19280        let mut payload_buf = [0; Self::ENCODED_LEN];
19281        let mut buf = if avail_len < Self::ENCODED_LEN {
19282            payload_buf[0..avail_len].copy_from_slice(__input);
19283            Bytes::new(&payload_buf)
19284        } else {
19285            Bytes::new(__input)
19286        };
19287        let mut __struct = Self::default();
19288        __struct.fitness = buf.get_f32_le();
19289        __struct.ofs_x = buf.get_f32_le();
19290        __struct.ofs_y = buf.get_f32_le();
19291        __struct.ofs_z = buf.get_f32_le();
19292        __struct.diag_x = buf.get_f32_le();
19293        __struct.diag_y = buf.get_f32_le();
19294        __struct.diag_z = buf.get_f32_le();
19295        __struct.offdiag_x = buf.get_f32_le();
19296        __struct.offdiag_y = buf.get_f32_le();
19297        __struct.offdiag_z = buf.get_f32_le();
19298        __struct.compass_id = buf.get_u8();
19299        __struct.cal_mask = buf.get_u8();
19300        let tmp = buf.get_u8();
19301        __struct.cal_status =
19302            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19303                enum_type: "MagCalStatus",
19304                value: tmp as u32,
19305            })?;
19306        __struct.autosaved = buf.get_u8();
19307        __struct.orientation_confidence = buf.get_f32_le();
19308        let tmp = buf.get_u8();
19309        __struct.old_orientation =
19310            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19311                enum_type: "MavSensorOrientation",
19312                value: tmp as u32,
19313            })?;
19314        let tmp = buf.get_u8();
19315        __struct.new_orientation =
19316            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19317                enum_type: "MavSensorOrientation",
19318                value: tmp as u32,
19319            })?;
19320        __struct.scale_factor = buf.get_f32_le();
19321        Ok(__struct)
19322    }
19323    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19324        let mut __tmp = BytesMut::new(bytes);
19325        #[allow(clippy::absurd_extreme_comparisons)]
19326        #[allow(unused_comparisons)]
19327        if __tmp.remaining() < Self::ENCODED_LEN {
19328            panic!(
19329                "buffer is too small (need {} bytes, but got {})",
19330                Self::ENCODED_LEN,
19331                __tmp.remaining(),
19332            )
19333        }
19334        __tmp.put_f32_le(self.fitness);
19335        __tmp.put_f32_le(self.ofs_x);
19336        __tmp.put_f32_le(self.ofs_y);
19337        __tmp.put_f32_le(self.ofs_z);
19338        __tmp.put_f32_le(self.diag_x);
19339        __tmp.put_f32_le(self.diag_y);
19340        __tmp.put_f32_le(self.diag_z);
19341        __tmp.put_f32_le(self.offdiag_x);
19342        __tmp.put_f32_le(self.offdiag_y);
19343        __tmp.put_f32_le(self.offdiag_z);
19344        __tmp.put_u8(self.compass_id);
19345        __tmp.put_u8(self.cal_mask);
19346        __tmp.put_u8(self.cal_status as u8);
19347        __tmp.put_u8(self.autosaved);
19348        if matches!(version, MavlinkVersion::V2) {
19349            __tmp.put_f32_le(self.orientation_confidence);
19350            __tmp.put_u8(self.old_orientation as u8);
19351            __tmp.put_u8(self.new_orientation as u8);
19352            __tmp.put_f32_le(self.scale_factor);
19353            let len = __tmp.len();
19354            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19355        } else {
19356            __tmp.len()
19357        }
19358    }
19359}
19360#[doc = "This message provides an API for manually controlling the vehicle using standard joystick axes nomenclature, along with a joystick-like input device. Unused axes can be disabled and buttons states are transmitted as individual on/off bits of a bitmask."]
19361#[doc = ""]
19362#[doc = "ID: 69"]
19363#[derive(Debug, Clone, PartialEq)]
19364#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19365#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19366pub struct MANUAL_CONTROL_DATA {
19367    #[doc = "X-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to forward(1000)-backward(-1000) movement on a joystick and the pitch of a vehicle."]
19368    pub x: i16,
19369    #[doc = "Y-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to left(-1000)-right(1000) movement on a joystick and the roll of a vehicle."]
19370    pub y: i16,
19371    #[doc = "Z-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to a separate slider movement with maximum being 1000 and minimum being -1000 on a joystick and the thrust of a vehicle. Positive values are positive thrust, negative values are negative thrust."]
19372    pub z: i16,
19373    #[doc = "R-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to a twisting of the joystick, with counter-clockwise being 1000 and clockwise being -1000, and the yaw of a vehicle."]
19374    pub r: i16,
19375    #[doc = "A bitfield corresponding to the joystick buttons' 0-15 current state, 1 for pressed, 0 for released. The lowest bit corresponds to Button 1."]
19376    pub buttons: u16,
19377    #[doc = "The system to be controlled."]
19378    pub target: u8,
19379    #[doc = "A bitfield corresponding to the joystick buttons' 16-31 current state, 1 for pressed, 0 for released. The lowest bit corresponds to Button 16."]
19380    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19381    pub buttons2: u16,
19382    #[doc = "Set bits to 1 to indicate which of the following extension fields contain valid data: bit 0: pitch, bit 1: roll, bit 2: aux1, bit 3: aux2, bit 4: aux3, bit 5: aux4, bit 6: aux5, bit 7: aux6"]
19383    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19384    pub enabled_extensions: u8,
19385    #[doc = "Pitch-only-axis, normalized to the range [-1000,1000]. Generally corresponds to pitch on vehicles with additional degrees of freedom. Valid if bit 0 of enabled_extensions field is set. Set to 0 if invalid."]
19386    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19387    pub s: i16,
19388    #[doc = "Roll-only-axis, normalized to the range [-1000,1000]. Generally corresponds to roll on vehicles with additional degrees of freedom. Valid if bit 1 of enabled_extensions field is set. Set to 0 if invalid."]
19389    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19390    pub t: i16,
19391    #[doc = "Aux continuous input field 1. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 2 of enabled_extensions field is set. 0 if bit 2 is unset."]
19392    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19393    pub aux1: i16,
19394    #[doc = "Aux continuous input field 2. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 3 of enabled_extensions field is set. 0 if bit 3 is unset."]
19395    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19396    pub aux2: i16,
19397    #[doc = "Aux continuous input field 3. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 4 of enabled_extensions field is set. 0 if bit 4 is unset."]
19398    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19399    pub aux3: i16,
19400    #[doc = "Aux continuous input field 4. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 5 of enabled_extensions field is set. 0 if bit 5 is unset."]
19401    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19402    pub aux4: i16,
19403    #[doc = "Aux continuous input field 5. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 6 of enabled_extensions field is set. 0 if bit 6 is unset."]
19404    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19405    pub aux5: i16,
19406    #[doc = "Aux continuous input field 6. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 7 of enabled_extensions field is set. 0 if bit 7 is unset."]
19407    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19408    pub aux6: i16,
19409}
19410impl MANUAL_CONTROL_DATA {
19411    pub const ENCODED_LEN: usize = 30usize;
19412    pub const DEFAULT: Self = Self {
19413        x: 0_i16,
19414        y: 0_i16,
19415        z: 0_i16,
19416        r: 0_i16,
19417        buttons: 0_u16,
19418        target: 0_u8,
19419        buttons2: 0_u16,
19420        enabled_extensions: 0_u8,
19421        s: 0_i16,
19422        t: 0_i16,
19423        aux1: 0_i16,
19424        aux2: 0_i16,
19425        aux3: 0_i16,
19426        aux4: 0_i16,
19427        aux5: 0_i16,
19428        aux6: 0_i16,
19429    };
19430    #[cfg(feature = "arbitrary")]
19431    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19432        use arbitrary::{Arbitrary, Unstructured};
19433        let mut buf = [0u8; 1024];
19434        rng.fill_bytes(&mut buf);
19435        let mut unstructured = Unstructured::new(&buf);
19436        Self::arbitrary(&mut unstructured).unwrap_or_default()
19437    }
19438}
19439impl Default for MANUAL_CONTROL_DATA {
19440    fn default() -> Self {
19441        Self::DEFAULT.clone()
19442    }
19443}
19444impl MessageData for MANUAL_CONTROL_DATA {
19445    type Message = MavMessage;
19446    const ID: u32 = 69u32;
19447    const NAME: &'static str = "MANUAL_CONTROL";
19448    const EXTRA_CRC: u8 = 243u8;
19449    const ENCODED_LEN: usize = 30usize;
19450    fn deser(
19451        _version: MavlinkVersion,
19452        __input: &[u8],
19453    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19454        let avail_len = __input.len();
19455        let mut payload_buf = [0; Self::ENCODED_LEN];
19456        let mut buf = if avail_len < Self::ENCODED_LEN {
19457            payload_buf[0..avail_len].copy_from_slice(__input);
19458            Bytes::new(&payload_buf)
19459        } else {
19460            Bytes::new(__input)
19461        };
19462        let mut __struct = Self::default();
19463        __struct.x = buf.get_i16_le();
19464        __struct.y = buf.get_i16_le();
19465        __struct.z = buf.get_i16_le();
19466        __struct.r = buf.get_i16_le();
19467        __struct.buttons = buf.get_u16_le();
19468        __struct.target = buf.get_u8();
19469        __struct.buttons2 = buf.get_u16_le();
19470        __struct.enabled_extensions = buf.get_u8();
19471        __struct.s = buf.get_i16_le();
19472        __struct.t = buf.get_i16_le();
19473        __struct.aux1 = buf.get_i16_le();
19474        __struct.aux2 = buf.get_i16_le();
19475        __struct.aux3 = buf.get_i16_le();
19476        __struct.aux4 = buf.get_i16_le();
19477        __struct.aux5 = buf.get_i16_le();
19478        __struct.aux6 = buf.get_i16_le();
19479        Ok(__struct)
19480    }
19481    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19482        let mut __tmp = BytesMut::new(bytes);
19483        #[allow(clippy::absurd_extreme_comparisons)]
19484        #[allow(unused_comparisons)]
19485        if __tmp.remaining() < Self::ENCODED_LEN {
19486            panic!(
19487                "buffer is too small (need {} bytes, but got {})",
19488                Self::ENCODED_LEN,
19489                __tmp.remaining(),
19490            )
19491        }
19492        __tmp.put_i16_le(self.x);
19493        __tmp.put_i16_le(self.y);
19494        __tmp.put_i16_le(self.z);
19495        __tmp.put_i16_le(self.r);
19496        __tmp.put_u16_le(self.buttons);
19497        __tmp.put_u8(self.target);
19498        if matches!(version, MavlinkVersion::V2) {
19499            __tmp.put_u16_le(self.buttons2);
19500            __tmp.put_u8(self.enabled_extensions);
19501            __tmp.put_i16_le(self.s);
19502            __tmp.put_i16_le(self.t);
19503            __tmp.put_i16_le(self.aux1);
19504            __tmp.put_i16_le(self.aux2);
19505            __tmp.put_i16_le(self.aux3);
19506            __tmp.put_i16_le(self.aux4);
19507            __tmp.put_i16_le(self.aux5);
19508            __tmp.put_i16_le(self.aux6);
19509            let len = __tmp.len();
19510            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19511        } else {
19512            __tmp.len()
19513        }
19514    }
19515}
19516#[doc = "Setpoint in roll, pitch, yaw and thrust from the operator."]
19517#[doc = ""]
19518#[doc = "ID: 81"]
19519#[derive(Debug, Clone, PartialEq)]
19520#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19521#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19522pub struct MANUAL_SETPOINT_DATA {
19523    #[doc = "Timestamp (time since system boot)."]
19524    pub time_boot_ms: u32,
19525    #[doc = "Desired roll rate"]
19526    pub roll: f32,
19527    #[doc = "Desired pitch rate"]
19528    pub pitch: f32,
19529    #[doc = "Desired yaw rate"]
19530    pub yaw: f32,
19531    #[doc = "Collective thrust, normalized to 0 .. 1"]
19532    pub thrust: f32,
19533    #[doc = "Flight mode switch position, 0.. 255"]
19534    pub mode_switch: u8,
19535    #[doc = "Override mode switch position, 0.. 255"]
19536    pub manual_override_switch: u8,
19537}
19538impl MANUAL_SETPOINT_DATA {
19539    pub const ENCODED_LEN: usize = 22usize;
19540    pub const DEFAULT: Self = Self {
19541        time_boot_ms: 0_u32,
19542        roll: 0.0_f32,
19543        pitch: 0.0_f32,
19544        yaw: 0.0_f32,
19545        thrust: 0.0_f32,
19546        mode_switch: 0_u8,
19547        manual_override_switch: 0_u8,
19548    };
19549    #[cfg(feature = "arbitrary")]
19550    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19551        use arbitrary::{Arbitrary, Unstructured};
19552        let mut buf = [0u8; 1024];
19553        rng.fill_bytes(&mut buf);
19554        let mut unstructured = Unstructured::new(&buf);
19555        Self::arbitrary(&mut unstructured).unwrap_or_default()
19556    }
19557}
19558impl Default for MANUAL_SETPOINT_DATA {
19559    fn default() -> Self {
19560        Self::DEFAULT.clone()
19561    }
19562}
19563impl MessageData for MANUAL_SETPOINT_DATA {
19564    type Message = MavMessage;
19565    const ID: u32 = 81u32;
19566    const NAME: &'static str = "MANUAL_SETPOINT";
19567    const EXTRA_CRC: u8 = 106u8;
19568    const ENCODED_LEN: usize = 22usize;
19569    fn deser(
19570        _version: MavlinkVersion,
19571        __input: &[u8],
19572    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19573        let avail_len = __input.len();
19574        let mut payload_buf = [0; Self::ENCODED_LEN];
19575        let mut buf = if avail_len < Self::ENCODED_LEN {
19576            payload_buf[0..avail_len].copy_from_slice(__input);
19577            Bytes::new(&payload_buf)
19578        } else {
19579            Bytes::new(__input)
19580        };
19581        let mut __struct = Self::default();
19582        __struct.time_boot_ms = buf.get_u32_le();
19583        __struct.roll = buf.get_f32_le();
19584        __struct.pitch = buf.get_f32_le();
19585        __struct.yaw = buf.get_f32_le();
19586        __struct.thrust = buf.get_f32_le();
19587        __struct.mode_switch = buf.get_u8();
19588        __struct.manual_override_switch = buf.get_u8();
19589        Ok(__struct)
19590    }
19591    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19592        let mut __tmp = BytesMut::new(bytes);
19593        #[allow(clippy::absurd_extreme_comparisons)]
19594        #[allow(unused_comparisons)]
19595        if __tmp.remaining() < Self::ENCODED_LEN {
19596            panic!(
19597                "buffer is too small (need {} bytes, but got {})",
19598                Self::ENCODED_LEN,
19599                __tmp.remaining(),
19600            )
19601        }
19602        __tmp.put_u32_le(self.time_boot_ms);
19603        __tmp.put_f32_le(self.roll);
19604        __tmp.put_f32_le(self.pitch);
19605        __tmp.put_f32_le(self.yaw);
19606        __tmp.put_f32_le(self.thrust);
19607        __tmp.put_u8(self.mode_switch);
19608        __tmp.put_u8(self.manual_override_switch);
19609        if matches!(version, MavlinkVersion::V2) {
19610            let len = __tmp.len();
19611            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19612        } else {
19613            __tmp.len()
19614        }
19615    }
19616}
19617#[doc = "Send raw controller memory. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
19618#[doc = ""]
19619#[doc = "ID: 249"]
19620#[derive(Debug, Clone, PartialEq)]
19621#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19622#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19623pub struct MEMORY_VECT_DATA {
19624    #[doc = "Starting address of the debug variables"]
19625    pub address: u16,
19626    #[doc = "Version code of the type variable. 0=unknown, type ignored and assumed int16_t. 1=as below"]
19627    pub ver: u8,
19628    #[doc = "Type code of the memory variables. for ver = 1: 0=16 x int16_t, 1=16 x uint16_t, 2=16 x Q15, 3=16 x 1Q14"]
19629    pub mavtype: u8,
19630    #[doc = "Memory contents at specified address"]
19631    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
19632    pub value: [i8; 32],
19633}
19634impl MEMORY_VECT_DATA {
19635    pub const ENCODED_LEN: usize = 36usize;
19636    pub const DEFAULT: Self = Self {
19637        address: 0_u16,
19638        ver: 0_u8,
19639        mavtype: 0_u8,
19640        value: [0_i8; 32usize],
19641    };
19642    #[cfg(feature = "arbitrary")]
19643    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19644        use arbitrary::{Arbitrary, Unstructured};
19645        let mut buf = [0u8; 1024];
19646        rng.fill_bytes(&mut buf);
19647        let mut unstructured = Unstructured::new(&buf);
19648        Self::arbitrary(&mut unstructured).unwrap_or_default()
19649    }
19650}
19651impl Default for MEMORY_VECT_DATA {
19652    fn default() -> Self {
19653        Self::DEFAULT.clone()
19654    }
19655}
19656impl MessageData for MEMORY_VECT_DATA {
19657    type Message = MavMessage;
19658    const ID: u32 = 249u32;
19659    const NAME: &'static str = "MEMORY_VECT";
19660    const EXTRA_CRC: u8 = 204u8;
19661    const ENCODED_LEN: usize = 36usize;
19662    fn deser(
19663        _version: MavlinkVersion,
19664        __input: &[u8],
19665    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19666        let avail_len = __input.len();
19667        let mut payload_buf = [0; Self::ENCODED_LEN];
19668        let mut buf = if avail_len < Self::ENCODED_LEN {
19669            payload_buf[0..avail_len].copy_from_slice(__input);
19670            Bytes::new(&payload_buf)
19671        } else {
19672            Bytes::new(__input)
19673        };
19674        let mut __struct = Self::default();
19675        __struct.address = buf.get_u16_le();
19676        __struct.ver = buf.get_u8();
19677        __struct.mavtype = buf.get_u8();
19678        for v in &mut __struct.value {
19679            let val = buf.get_i8();
19680            *v = val;
19681        }
19682        Ok(__struct)
19683    }
19684    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19685        let mut __tmp = BytesMut::new(bytes);
19686        #[allow(clippy::absurd_extreme_comparisons)]
19687        #[allow(unused_comparisons)]
19688        if __tmp.remaining() < Self::ENCODED_LEN {
19689            panic!(
19690                "buffer is too small (need {} bytes, but got {})",
19691                Self::ENCODED_LEN,
19692                __tmp.remaining(),
19693            )
19694        }
19695        __tmp.put_u16_le(self.address);
19696        __tmp.put_u8(self.ver);
19697        __tmp.put_u8(self.mavtype);
19698        for val in &self.value {
19699            __tmp.put_i8(*val);
19700        }
19701        if matches!(version, MavlinkVersion::V2) {
19702            let len = __tmp.len();
19703            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19704        } else {
19705            __tmp.len()
19706        }
19707    }
19708}
19709#[doc = "The interval between messages for a particular MAVLink message ID.         This message is sent in response to the MAV_CMD_REQUEST_MESSAGE command with param1=244 (this message) and param2=message_id (the id of the message for which the interval is required). \tIt may also be sent in response to MAV_CMD_GET_MESSAGE_INTERVAL. \tThis interface replaces DATA_STREAM."]
19710#[doc = ""]
19711#[doc = "ID: 244"]
19712#[derive(Debug, Clone, PartialEq)]
19713#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19714#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19715pub struct MESSAGE_INTERVAL_DATA {
19716    #[doc = "0 indicates the interval at which it is sent."]
19717    pub interval_us: i32,
19718    #[doc = "The ID of the requested MAVLink message. v1.0 is limited to 254 messages."]
19719    pub message_id: u16,
19720}
19721impl MESSAGE_INTERVAL_DATA {
19722    pub const ENCODED_LEN: usize = 6usize;
19723    pub const DEFAULT: Self = Self {
19724        interval_us: 0_i32,
19725        message_id: 0_u16,
19726    };
19727    #[cfg(feature = "arbitrary")]
19728    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19729        use arbitrary::{Arbitrary, Unstructured};
19730        let mut buf = [0u8; 1024];
19731        rng.fill_bytes(&mut buf);
19732        let mut unstructured = Unstructured::new(&buf);
19733        Self::arbitrary(&mut unstructured).unwrap_or_default()
19734    }
19735}
19736impl Default for MESSAGE_INTERVAL_DATA {
19737    fn default() -> Self {
19738        Self::DEFAULT.clone()
19739    }
19740}
19741impl MessageData for MESSAGE_INTERVAL_DATA {
19742    type Message = MavMessage;
19743    const ID: u32 = 244u32;
19744    const NAME: &'static str = "MESSAGE_INTERVAL";
19745    const EXTRA_CRC: u8 = 95u8;
19746    const ENCODED_LEN: usize = 6usize;
19747    fn deser(
19748        _version: MavlinkVersion,
19749        __input: &[u8],
19750    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19751        let avail_len = __input.len();
19752        let mut payload_buf = [0; Self::ENCODED_LEN];
19753        let mut buf = if avail_len < Self::ENCODED_LEN {
19754            payload_buf[0..avail_len].copy_from_slice(__input);
19755            Bytes::new(&payload_buf)
19756        } else {
19757            Bytes::new(__input)
19758        };
19759        let mut __struct = Self::default();
19760        __struct.interval_us = buf.get_i32_le();
19761        __struct.message_id = buf.get_u16_le();
19762        Ok(__struct)
19763    }
19764    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19765        let mut __tmp = BytesMut::new(bytes);
19766        #[allow(clippy::absurd_extreme_comparisons)]
19767        #[allow(unused_comparisons)]
19768        if __tmp.remaining() < Self::ENCODED_LEN {
19769            panic!(
19770                "buffer is too small (need {} bytes, but got {})",
19771                Self::ENCODED_LEN,
19772                __tmp.remaining(),
19773            )
19774        }
19775        __tmp.put_i32_le(self.interval_us);
19776        __tmp.put_u16_le(self.message_id);
19777        if matches!(version, MavlinkVersion::V2) {
19778            let len = __tmp.len();
19779            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19780        } else {
19781            __tmp.len()
19782        }
19783    }
19784}
19785#[doc = "Acknowledgment message during waypoint handling. The type field states if this message is a positive ack (type=0) or if an error happened (type=non-zero)."]
19786#[doc = ""]
19787#[doc = "ID: 47"]
19788#[derive(Debug, Clone, PartialEq)]
19789#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19790#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19791pub struct MISSION_ACK_DATA {
19792    #[doc = "System ID"]
19793    pub target_system: u8,
19794    #[doc = "Component ID"]
19795    pub target_component: u8,
19796    #[doc = "Mission result."]
19797    pub mavtype: MavMissionResult,
19798    #[doc = "Mission type."]
19799    #[cfg_attr(feature = "serde", serde(default))]
19800    pub mission_type: MavMissionType,
19801    #[doc = "Id of new on-vehicle mission, fence, or rally point plan (on upload to vehicle).         The id is calculated and returned by a vehicle when a new plan is uploaded by a GCS.         The only requirement on the id is that it must change when there is any change to the on-vehicle plan type (there is no requirement that the id be globally unique).         0 on download from the vehicle to the GCS (on download the ID is set in MISSION_COUNT).         0 if plan ids are not supported.         The current on-vehicle plan ids are streamed in `MISSION_CURRENT`, allowing a GCS to determine if any part of the plan has changed and needs to be re-uploaded."]
19802    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19803    pub opaque_id: u32,
19804}
19805impl MISSION_ACK_DATA {
19806    pub const ENCODED_LEN: usize = 8usize;
19807    pub const DEFAULT: Self = Self {
19808        target_system: 0_u8,
19809        target_component: 0_u8,
19810        mavtype: MavMissionResult::DEFAULT,
19811        mission_type: MavMissionType::DEFAULT,
19812        opaque_id: 0_u32,
19813    };
19814    #[cfg(feature = "arbitrary")]
19815    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19816        use arbitrary::{Arbitrary, Unstructured};
19817        let mut buf = [0u8; 1024];
19818        rng.fill_bytes(&mut buf);
19819        let mut unstructured = Unstructured::new(&buf);
19820        Self::arbitrary(&mut unstructured).unwrap_or_default()
19821    }
19822}
19823impl Default for MISSION_ACK_DATA {
19824    fn default() -> Self {
19825        Self::DEFAULT.clone()
19826    }
19827}
19828impl MessageData for MISSION_ACK_DATA {
19829    type Message = MavMessage;
19830    const ID: u32 = 47u32;
19831    const NAME: &'static str = "MISSION_ACK";
19832    const EXTRA_CRC: u8 = 153u8;
19833    const ENCODED_LEN: usize = 8usize;
19834    fn deser(
19835        _version: MavlinkVersion,
19836        __input: &[u8],
19837    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19838        let avail_len = __input.len();
19839        let mut payload_buf = [0; Self::ENCODED_LEN];
19840        let mut buf = if avail_len < Self::ENCODED_LEN {
19841            payload_buf[0..avail_len].copy_from_slice(__input);
19842            Bytes::new(&payload_buf)
19843        } else {
19844            Bytes::new(__input)
19845        };
19846        let mut __struct = Self::default();
19847        __struct.target_system = buf.get_u8();
19848        __struct.target_component = buf.get_u8();
19849        let tmp = buf.get_u8();
19850        __struct.mavtype =
19851            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19852                enum_type: "MavMissionResult",
19853                value: tmp as u32,
19854            })?;
19855        let tmp = buf.get_u8();
19856        __struct.mission_type =
19857            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19858                enum_type: "MavMissionType",
19859                value: tmp as u32,
19860            })?;
19861        __struct.opaque_id = buf.get_u32_le();
19862        Ok(__struct)
19863    }
19864    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19865        let mut __tmp = BytesMut::new(bytes);
19866        #[allow(clippy::absurd_extreme_comparisons)]
19867        #[allow(unused_comparisons)]
19868        if __tmp.remaining() < Self::ENCODED_LEN {
19869            panic!(
19870                "buffer is too small (need {} bytes, but got {})",
19871                Self::ENCODED_LEN,
19872                __tmp.remaining(),
19873            )
19874        }
19875        __tmp.put_u8(self.target_system);
19876        __tmp.put_u8(self.target_component);
19877        __tmp.put_u8(self.mavtype as u8);
19878        if matches!(version, MavlinkVersion::V2) {
19879            __tmp.put_u8(self.mission_type as u8);
19880            __tmp.put_u32_le(self.opaque_id);
19881            let len = __tmp.len();
19882            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19883        } else {
19884            __tmp.len()
19885        }
19886    }
19887}
19888#[doc = "Delete all mission items at once."]
19889#[doc = ""]
19890#[doc = "ID: 45"]
19891#[derive(Debug, Clone, PartialEq)]
19892#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19893#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19894pub struct MISSION_CLEAR_ALL_DATA {
19895    #[doc = "System ID"]
19896    pub target_system: u8,
19897    #[doc = "Component ID"]
19898    pub target_component: u8,
19899    #[doc = "Mission type."]
19900    #[cfg_attr(feature = "serde", serde(default))]
19901    pub mission_type: MavMissionType,
19902}
19903impl MISSION_CLEAR_ALL_DATA {
19904    pub const ENCODED_LEN: usize = 3usize;
19905    pub const DEFAULT: Self = Self {
19906        target_system: 0_u8,
19907        target_component: 0_u8,
19908        mission_type: MavMissionType::DEFAULT,
19909    };
19910    #[cfg(feature = "arbitrary")]
19911    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19912        use arbitrary::{Arbitrary, Unstructured};
19913        let mut buf = [0u8; 1024];
19914        rng.fill_bytes(&mut buf);
19915        let mut unstructured = Unstructured::new(&buf);
19916        Self::arbitrary(&mut unstructured).unwrap_or_default()
19917    }
19918}
19919impl Default for MISSION_CLEAR_ALL_DATA {
19920    fn default() -> Self {
19921        Self::DEFAULT.clone()
19922    }
19923}
19924impl MessageData for MISSION_CLEAR_ALL_DATA {
19925    type Message = MavMessage;
19926    const ID: u32 = 45u32;
19927    const NAME: &'static str = "MISSION_CLEAR_ALL";
19928    const EXTRA_CRC: u8 = 232u8;
19929    const ENCODED_LEN: usize = 3usize;
19930    fn deser(
19931        _version: MavlinkVersion,
19932        __input: &[u8],
19933    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19934        let avail_len = __input.len();
19935        let mut payload_buf = [0; Self::ENCODED_LEN];
19936        let mut buf = if avail_len < Self::ENCODED_LEN {
19937            payload_buf[0..avail_len].copy_from_slice(__input);
19938            Bytes::new(&payload_buf)
19939        } else {
19940            Bytes::new(__input)
19941        };
19942        let mut __struct = Self::default();
19943        __struct.target_system = buf.get_u8();
19944        __struct.target_component = buf.get_u8();
19945        let tmp = buf.get_u8();
19946        __struct.mission_type =
19947            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19948                enum_type: "MavMissionType",
19949                value: tmp as u32,
19950            })?;
19951        Ok(__struct)
19952    }
19953    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19954        let mut __tmp = BytesMut::new(bytes);
19955        #[allow(clippy::absurd_extreme_comparisons)]
19956        #[allow(unused_comparisons)]
19957        if __tmp.remaining() < Self::ENCODED_LEN {
19958            panic!(
19959                "buffer is too small (need {} bytes, but got {})",
19960                Self::ENCODED_LEN,
19961                __tmp.remaining(),
19962            )
19963        }
19964        __tmp.put_u8(self.target_system);
19965        __tmp.put_u8(self.target_component);
19966        if matches!(version, MavlinkVersion::V2) {
19967            __tmp.put_u8(self.mission_type as u8);
19968            let len = __tmp.len();
19969            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19970        } else {
19971            __tmp.len()
19972        }
19973    }
19974}
19975#[doc = "This message is emitted as response to MISSION_REQUEST_LIST by the MAV and to initiate a write transaction. The GCS can then request the individual mission item based on the knowledge of the total number of waypoints."]
19976#[doc = ""]
19977#[doc = "ID: 44"]
19978#[derive(Debug, Clone, PartialEq)]
19979#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19980#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19981pub struct MISSION_COUNT_DATA {
19982    #[doc = "Number of mission items in the sequence"]
19983    pub count: u16,
19984    #[doc = "System ID"]
19985    pub target_system: u8,
19986    #[doc = "Component ID"]
19987    pub target_component: u8,
19988    #[doc = "Mission type."]
19989    #[cfg_attr(feature = "serde", serde(default))]
19990    pub mission_type: MavMissionType,
19991    #[doc = "Id of current on-vehicle mission, fence, or rally point plan (on download from vehicle).         This field is used when downloading a plan from a vehicle to a GCS.         0 on upload to the vehicle from GCS.         0 if plan ids are not supported.         The current on-vehicle plan ids are streamed in `MISSION_CURRENT`, allowing a GCS to determine if any part of the plan has changed and needs to be re-uploaded.         The ids are recalculated by the vehicle when any part of the on-vehicle plan changes (when a new plan is uploaded, the vehicle returns the new id to the GCS in MISSION_ACK)."]
19992    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19993    pub opaque_id: u32,
19994}
19995impl MISSION_COUNT_DATA {
19996    pub const ENCODED_LEN: usize = 9usize;
19997    pub const DEFAULT: Self = Self {
19998        count: 0_u16,
19999        target_system: 0_u8,
20000        target_component: 0_u8,
20001        mission_type: MavMissionType::DEFAULT,
20002        opaque_id: 0_u32,
20003    };
20004    #[cfg(feature = "arbitrary")]
20005    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20006        use arbitrary::{Arbitrary, Unstructured};
20007        let mut buf = [0u8; 1024];
20008        rng.fill_bytes(&mut buf);
20009        let mut unstructured = Unstructured::new(&buf);
20010        Self::arbitrary(&mut unstructured).unwrap_or_default()
20011    }
20012}
20013impl Default for MISSION_COUNT_DATA {
20014    fn default() -> Self {
20015        Self::DEFAULT.clone()
20016    }
20017}
20018impl MessageData for MISSION_COUNT_DATA {
20019    type Message = MavMessage;
20020    const ID: u32 = 44u32;
20021    const NAME: &'static str = "MISSION_COUNT";
20022    const EXTRA_CRC: u8 = 221u8;
20023    const ENCODED_LEN: usize = 9usize;
20024    fn deser(
20025        _version: MavlinkVersion,
20026        __input: &[u8],
20027    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20028        let avail_len = __input.len();
20029        let mut payload_buf = [0; Self::ENCODED_LEN];
20030        let mut buf = if avail_len < Self::ENCODED_LEN {
20031            payload_buf[0..avail_len].copy_from_slice(__input);
20032            Bytes::new(&payload_buf)
20033        } else {
20034            Bytes::new(__input)
20035        };
20036        let mut __struct = Self::default();
20037        __struct.count = buf.get_u16_le();
20038        __struct.target_system = buf.get_u8();
20039        __struct.target_component = buf.get_u8();
20040        let tmp = buf.get_u8();
20041        __struct.mission_type =
20042            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20043                enum_type: "MavMissionType",
20044                value: tmp as u32,
20045            })?;
20046        __struct.opaque_id = buf.get_u32_le();
20047        Ok(__struct)
20048    }
20049    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20050        let mut __tmp = BytesMut::new(bytes);
20051        #[allow(clippy::absurd_extreme_comparisons)]
20052        #[allow(unused_comparisons)]
20053        if __tmp.remaining() < Self::ENCODED_LEN {
20054            panic!(
20055                "buffer is too small (need {} bytes, but got {})",
20056                Self::ENCODED_LEN,
20057                __tmp.remaining(),
20058            )
20059        }
20060        __tmp.put_u16_le(self.count);
20061        __tmp.put_u8(self.target_system);
20062        __tmp.put_u8(self.target_component);
20063        if matches!(version, MavlinkVersion::V2) {
20064            __tmp.put_u8(self.mission_type as u8);
20065            __tmp.put_u32_le(self.opaque_id);
20066            let len = __tmp.len();
20067            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20068        } else {
20069            __tmp.len()
20070        }
20071    }
20072}
20073#[doc = "Message that announces the sequence number of the current target mission item (that the system will fly towards/execute when the mission is running).         This message should be streamed all the time (nominally at 1Hz).         This message should be emitted following a call to MAV_CMD_DO_SET_MISSION_CURRENT or MISSION_SET_CURRENT."]
20074#[doc = ""]
20075#[doc = "ID: 42"]
20076#[derive(Debug, Clone, PartialEq)]
20077#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20078#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20079pub struct MISSION_CURRENT_DATA {
20080    #[doc = "Sequence"]
20081    pub seq: u16,
20082    #[doc = "Total number of mission items on vehicle (on last item, sequence == total). If the autopilot stores its home location as part of the mission this will be excluded from the total. 0: Not supported, UINT16_MAX if no mission is present on the vehicle."]
20083    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
20084    pub total: u16,
20085    #[doc = "Mission state machine state. MISSION_STATE_UNKNOWN if state reporting not supported."]
20086    #[cfg_attr(feature = "serde", serde(default))]
20087    pub mission_state: MissionState,
20088    #[doc = "Vehicle is in a mode that can execute mission items or suspended. 0: Unknown, 1: In mission mode, 2: Suspended (not in mission mode)."]
20089    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
20090    pub mission_mode: u8,
20091    #[doc = "Id of current on-vehicle mission plan, or 0 if IDs are not supported or there is no mission loaded. GCS can use this to track changes to the mission plan type. The same value is returned on mission upload (in the MISSION_ACK)."]
20092    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
20093    pub mission_id: u32,
20094    #[doc = "Id of current on-vehicle fence plan, or 0 if IDs are not supported or there is no fence loaded. GCS can use this to track changes to the fence plan type. The same value is returned on fence upload (in the MISSION_ACK)."]
20095    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
20096    pub fence_id: u32,
20097    #[doc = "Id of current on-vehicle rally point plan, or 0 if IDs are not supported or there are no rally points loaded. GCS can use this to track changes to the rally point plan type. The same value is returned on rally point upload (in the MISSION_ACK)."]
20098    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
20099    pub rally_points_id: u32,
20100}
20101impl MISSION_CURRENT_DATA {
20102    pub const ENCODED_LEN: usize = 18usize;
20103    pub const DEFAULT: Self = Self {
20104        seq: 0_u16,
20105        total: 0_u16,
20106        mission_state: MissionState::DEFAULT,
20107        mission_mode: 0_u8,
20108        mission_id: 0_u32,
20109        fence_id: 0_u32,
20110        rally_points_id: 0_u32,
20111    };
20112    #[cfg(feature = "arbitrary")]
20113    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20114        use arbitrary::{Arbitrary, Unstructured};
20115        let mut buf = [0u8; 1024];
20116        rng.fill_bytes(&mut buf);
20117        let mut unstructured = Unstructured::new(&buf);
20118        Self::arbitrary(&mut unstructured).unwrap_or_default()
20119    }
20120}
20121impl Default for MISSION_CURRENT_DATA {
20122    fn default() -> Self {
20123        Self::DEFAULT.clone()
20124    }
20125}
20126impl MessageData for MISSION_CURRENT_DATA {
20127    type Message = MavMessage;
20128    const ID: u32 = 42u32;
20129    const NAME: &'static str = "MISSION_CURRENT";
20130    const EXTRA_CRC: u8 = 28u8;
20131    const ENCODED_LEN: usize = 18usize;
20132    fn deser(
20133        _version: MavlinkVersion,
20134        __input: &[u8],
20135    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20136        let avail_len = __input.len();
20137        let mut payload_buf = [0; Self::ENCODED_LEN];
20138        let mut buf = if avail_len < Self::ENCODED_LEN {
20139            payload_buf[0..avail_len].copy_from_slice(__input);
20140            Bytes::new(&payload_buf)
20141        } else {
20142            Bytes::new(__input)
20143        };
20144        let mut __struct = Self::default();
20145        __struct.seq = buf.get_u16_le();
20146        __struct.total = buf.get_u16_le();
20147        let tmp = buf.get_u8();
20148        __struct.mission_state =
20149            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20150                enum_type: "MissionState",
20151                value: tmp as u32,
20152            })?;
20153        __struct.mission_mode = buf.get_u8();
20154        __struct.mission_id = buf.get_u32_le();
20155        __struct.fence_id = buf.get_u32_le();
20156        __struct.rally_points_id = buf.get_u32_le();
20157        Ok(__struct)
20158    }
20159    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20160        let mut __tmp = BytesMut::new(bytes);
20161        #[allow(clippy::absurd_extreme_comparisons)]
20162        #[allow(unused_comparisons)]
20163        if __tmp.remaining() < Self::ENCODED_LEN {
20164            panic!(
20165                "buffer is too small (need {} bytes, but got {})",
20166                Self::ENCODED_LEN,
20167                __tmp.remaining(),
20168            )
20169        }
20170        __tmp.put_u16_le(self.seq);
20171        if matches!(version, MavlinkVersion::V2) {
20172            __tmp.put_u16_le(self.total);
20173            __tmp.put_u8(self.mission_state as u8);
20174            __tmp.put_u8(self.mission_mode);
20175            __tmp.put_u32_le(self.mission_id);
20176            __tmp.put_u32_le(self.fence_id);
20177            __tmp.put_u32_le(self.rally_points_id);
20178            let len = __tmp.len();
20179            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20180        } else {
20181            __tmp.len()
20182        }
20183    }
20184}
20185#[deprecated = " See `MISSION_ITEM_INT` (Deprecated since 2020-06)"]
20186#[doc = "Message encoding a mission item. This message is emitted to announce                 the presence of a mission item and to set a mission item on the system. The mission item can be either in x, y, z meters (type: LOCAL) or x:lat, y:lon, z:altitude. Local frame is Z-down, right handed (NED), global frame is Z-up, right handed (ENU). NaN may be used to indicate an optional/default value (e.g. to use the system's current latitude or yaw rather than a specific value). See also <https://mavlink.io/en/services/mission.html>."]
20187#[doc = ""]
20188#[doc = "ID: 39"]
20189#[derive(Debug, Clone, PartialEq)]
20190#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20191#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20192pub struct MISSION_ITEM_DATA {
20193    #[doc = "PARAM1, see MAV_CMD enum"]
20194    pub param1: f32,
20195    #[doc = "PARAM2, see MAV_CMD enum"]
20196    pub param2: f32,
20197    #[doc = "PARAM3, see MAV_CMD enum"]
20198    pub param3: f32,
20199    #[doc = "PARAM4, see MAV_CMD enum"]
20200    pub param4: f32,
20201    #[doc = "PARAM5 / local: X coordinate, global: latitude"]
20202    pub x: f32,
20203    #[doc = "PARAM6 / local: Y coordinate, global: longitude"]
20204    pub y: f32,
20205    #[doc = "PARAM7 / local: Z coordinate, global: altitude (relative or absolute, depending on frame)."]
20206    pub z: f32,
20207    #[doc = "Sequence"]
20208    pub seq: u16,
20209    #[doc = "The scheduled action for the waypoint."]
20210    pub command: MavCmd,
20211    #[doc = "System ID"]
20212    pub target_system: u8,
20213    #[doc = "Component ID"]
20214    pub target_component: u8,
20215    #[doc = "The coordinate system of the waypoint."]
20216    pub frame: MavFrame,
20217    #[doc = "false:0, true:1"]
20218    pub current: u8,
20219    #[doc = "Autocontinue to next waypoint. 0: false, 1: true. Set false to pause mission after the item completes."]
20220    pub autocontinue: u8,
20221    #[doc = "Mission type."]
20222    #[cfg_attr(feature = "serde", serde(default))]
20223    pub mission_type: MavMissionType,
20224}
20225impl MISSION_ITEM_DATA {
20226    pub const ENCODED_LEN: usize = 38usize;
20227    pub const DEFAULT: Self = Self {
20228        param1: 0.0_f32,
20229        param2: 0.0_f32,
20230        param3: 0.0_f32,
20231        param4: 0.0_f32,
20232        x: 0.0_f32,
20233        y: 0.0_f32,
20234        z: 0.0_f32,
20235        seq: 0_u16,
20236        command: MavCmd::DEFAULT,
20237        target_system: 0_u8,
20238        target_component: 0_u8,
20239        frame: MavFrame::DEFAULT,
20240        current: 0_u8,
20241        autocontinue: 0_u8,
20242        mission_type: MavMissionType::DEFAULT,
20243    };
20244    #[cfg(feature = "arbitrary")]
20245    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20246        use arbitrary::{Arbitrary, Unstructured};
20247        let mut buf = [0u8; 1024];
20248        rng.fill_bytes(&mut buf);
20249        let mut unstructured = Unstructured::new(&buf);
20250        Self::arbitrary(&mut unstructured).unwrap_or_default()
20251    }
20252}
20253impl Default for MISSION_ITEM_DATA {
20254    fn default() -> Self {
20255        Self::DEFAULT.clone()
20256    }
20257}
20258impl MessageData for MISSION_ITEM_DATA {
20259    type Message = MavMessage;
20260    const ID: u32 = 39u32;
20261    const NAME: &'static str = "MISSION_ITEM";
20262    const EXTRA_CRC: u8 = 254u8;
20263    const ENCODED_LEN: usize = 38usize;
20264    fn deser(
20265        _version: MavlinkVersion,
20266        __input: &[u8],
20267    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20268        let avail_len = __input.len();
20269        let mut payload_buf = [0; Self::ENCODED_LEN];
20270        let mut buf = if avail_len < Self::ENCODED_LEN {
20271            payload_buf[0..avail_len].copy_from_slice(__input);
20272            Bytes::new(&payload_buf)
20273        } else {
20274            Bytes::new(__input)
20275        };
20276        let mut __struct = Self::default();
20277        __struct.param1 = buf.get_f32_le();
20278        __struct.param2 = buf.get_f32_le();
20279        __struct.param3 = buf.get_f32_le();
20280        __struct.param4 = buf.get_f32_le();
20281        __struct.x = buf.get_f32_le();
20282        __struct.y = buf.get_f32_le();
20283        __struct.z = buf.get_f32_le();
20284        __struct.seq = buf.get_u16_le();
20285        let tmp = buf.get_u16_le();
20286        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
20287            ::mavlink_core::error::ParserError::InvalidEnum {
20288                enum_type: "MavCmd",
20289                value: tmp as u32,
20290            },
20291        )?;
20292        __struct.target_system = buf.get_u8();
20293        __struct.target_component = buf.get_u8();
20294        let tmp = buf.get_u8();
20295        __struct.frame =
20296            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20297                enum_type: "MavFrame",
20298                value: tmp as u32,
20299            })?;
20300        __struct.current = buf.get_u8();
20301        __struct.autocontinue = buf.get_u8();
20302        let tmp = buf.get_u8();
20303        __struct.mission_type =
20304            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20305                enum_type: "MavMissionType",
20306                value: tmp as u32,
20307            })?;
20308        Ok(__struct)
20309    }
20310    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20311        let mut __tmp = BytesMut::new(bytes);
20312        #[allow(clippy::absurd_extreme_comparisons)]
20313        #[allow(unused_comparisons)]
20314        if __tmp.remaining() < Self::ENCODED_LEN {
20315            panic!(
20316                "buffer is too small (need {} bytes, but got {})",
20317                Self::ENCODED_LEN,
20318                __tmp.remaining(),
20319            )
20320        }
20321        __tmp.put_f32_le(self.param1);
20322        __tmp.put_f32_le(self.param2);
20323        __tmp.put_f32_le(self.param3);
20324        __tmp.put_f32_le(self.param4);
20325        __tmp.put_f32_le(self.x);
20326        __tmp.put_f32_le(self.y);
20327        __tmp.put_f32_le(self.z);
20328        __tmp.put_u16_le(self.seq);
20329        __tmp.put_u16_le(self.command as u16);
20330        __tmp.put_u8(self.target_system);
20331        __tmp.put_u8(self.target_component);
20332        __tmp.put_u8(self.frame as u8);
20333        __tmp.put_u8(self.current);
20334        __tmp.put_u8(self.autocontinue);
20335        if matches!(version, MavlinkVersion::V2) {
20336            __tmp.put_u8(self.mission_type as u8);
20337            let len = __tmp.len();
20338            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20339        } else {
20340            __tmp.len()
20341        }
20342    }
20343}
20344#[doc = "Message encoding a mission item. This message is emitted to announce                 the presence of a mission item and to set a mission item on the system. The mission item can be either in x, y, z meters (type: LOCAL) or x:lat, y:lon, z:altitude. Local frame is Z-down, right handed (NED), global frame is Z-up, right handed (ENU). NaN or INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current latitude, yaw rather than a specific value). See also <https://mavlink.io/en/services/mission.html>."]
20345#[doc = ""]
20346#[doc = "ID: 73"]
20347#[derive(Debug, Clone, PartialEq)]
20348#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20349#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20350pub struct MISSION_ITEM_INT_DATA {
20351    #[doc = "PARAM1, see MAV_CMD enum"]
20352    pub param1: f32,
20353    #[doc = "PARAM2, see MAV_CMD enum"]
20354    pub param2: f32,
20355    #[doc = "PARAM3, see MAV_CMD enum"]
20356    pub param3: f32,
20357    #[doc = "PARAM4, see MAV_CMD enum"]
20358    pub param4: f32,
20359    #[doc = "PARAM5 / local: x position in meters * 1e4, global: latitude in degrees * 10^7"]
20360    pub x: i32,
20361    #[doc = "PARAM6 / y position: local: x position in meters * 1e4, global: longitude in degrees *10^7"]
20362    pub y: i32,
20363    #[doc = "PARAM7 / z position: global: altitude in meters (relative or absolute, depending on frame."]
20364    pub z: f32,
20365    #[doc = "Waypoint ID (sequence number). Starts at zero. Increases monotonically for each waypoint, no gaps in the sequence (0,1,2,3,4)."]
20366    pub seq: u16,
20367    #[doc = "The scheduled action for the waypoint."]
20368    pub command: MavCmd,
20369    #[doc = "System ID"]
20370    pub target_system: u8,
20371    #[doc = "Component ID"]
20372    pub target_component: u8,
20373    #[doc = "The coordinate system of the waypoint."]
20374    pub frame: MavFrame,
20375    #[doc = "false:0, true:1"]
20376    pub current: u8,
20377    #[doc = "Autocontinue to next waypoint. 0: false, 1: true. Set false to pause mission after the item completes."]
20378    pub autocontinue: u8,
20379    #[doc = "Mission type."]
20380    #[cfg_attr(feature = "serde", serde(default))]
20381    pub mission_type: MavMissionType,
20382}
20383impl MISSION_ITEM_INT_DATA {
20384    pub const ENCODED_LEN: usize = 38usize;
20385    pub const DEFAULT: Self = Self {
20386        param1: 0.0_f32,
20387        param2: 0.0_f32,
20388        param3: 0.0_f32,
20389        param4: 0.0_f32,
20390        x: 0_i32,
20391        y: 0_i32,
20392        z: 0.0_f32,
20393        seq: 0_u16,
20394        command: MavCmd::DEFAULT,
20395        target_system: 0_u8,
20396        target_component: 0_u8,
20397        frame: MavFrame::DEFAULT,
20398        current: 0_u8,
20399        autocontinue: 0_u8,
20400        mission_type: MavMissionType::DEFAULT,
20401    };
20402    #[cfg(feature = "arbitrary")]
20403    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20404        use arbitrary::{Arbitrary, Unstructured};
20405        let mut buf = [0u8; 1024];
20406        rng.fill_bytes(&mut buf);
20407        let mut unstructured = Unstructured::new(&buf);
20408        Self::arbitrary(&mut unstructured).unwrap_or_default()
20409    }
20410}
20411impl Default for MISSION_ITEM_INT_DATA {
20412    fn default() -> Self {
20413        Self::DEFAULT.clone()
20414    }
20415}
20416impl MessageData for MISSION_ITEM_INT_DATA {
20417    type Message = MavMessage;
20418    const ID: u32 = 73u32;
20419    const NAME: &'static str = "MISSION_ITEM_INT";
20420    const EXTRA_CRC: u8 = 38u8;
20421    const ENCODED_LEN: usize = 38usize;
20422    fn deser(
20423        _version: MavlinkVersion,
20424        __input: &[u8],
20425    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20426        let avail_len = __input.len();
20427        let mut payload_buf = [0; Self::ENCODED_LEN];
20428        let mut buf = if avail_len < Self::ENCODED_LEN {
20429            payload_buf[0..avail_len].copy_from_slice(__input);
20430            Bytes::new(&payload_buf)
20431        } else {
20432            Bytes::new(__input)
20433        };
20434        let mut __struct = Self::default();
20435        __struct.param1 = buf.get_f32_le();
20436        __struct.param2 = buf.get_f32_le();
20437        __struct.param3 = buf.get_f32_le();
20438        __struct.param4 = buf.get_f32_le();
20439        __struct.x = buf.get_i32_le();
20440        __struct.y = buf.get_i32_le();
20441        __struct.z = buf.get_f32_le();
20442        __struct.seq = buf.get_u16_le();
20443        let tmp = buf.get_u16_le();
20444        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
20445            ::mavlink_core::error::ParserError::InvalidEnum {
20446                enum_type: "MavCmd",
20447                value: tmp as u32,
20448            },
20449        )?;
20450        __struct.target_system = buf.get_u8();
20451        __struct.target_component = buf.get_u8();
20452        let tmp = buf.get_u8();
20453        __struct.frame =
20454            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20455                enum_type: "MavFrame",
20456                value: tmp as u32,
20457            })?;
20458        __struct.current = buf.get_u8();
20459        __struct.autocontinue = buf.get_u8();
20460        let tmp = buf.get_u8();
20461        __struct.mission_type =
20462            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20463                enum_type: "MavMissionType",
20464                value: tmp as u32,
20465            })?;
20466        Ok(__struct)
20467    }
20468    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20469        let mut __tmp = BytesMut::new(bytes);
20470        #[allow(clippy::absurd_extreme_comparisons)]
20471        #[allow(unused_comparisons)]
20472        if __tmp.remaining() < Self::ENCODED_LEN {
20473            panic!(
20474                "buffer is too small (need {} bytes, but got {})",
20475                Self::ENCODED_LEN,
20476                __tmp.remaining(),
20477            )
20478        }
20479        __tmp.put_f32_le(self.param1);
20480        __tmp.put_f32_le(self.param2);
20481        __tmp.put_f32_le(self.param3);
20482        __tmp.put_f32_le(self.param4);
20483        __tmp.put_i32_le(self.x);
20484        __tmp.put_i32_le(self.y);
20485        __tmp.put_f32_le(self.z);
20486        __tmp.put_u16_le(self.seq);
20487        __tmp.put_u16_le(self.command as u16);
20488        __tmp.put_u8(self.target_system);
20489        __tmp.put_u8(self.target_component);
20490        __tmp.put_u8(self.frame as u8);
20491        __tmp.put_u8(self.current);
20492        __tmp.put_u8(self.autocontinue);
20493        if matches!(version, MavlinkVersion::V2) {
20494            __tmp.put_u8(self.mission_type as u8);
20495            let len = __tmp.len();
20496            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20497        } else {
20498            __tmp.len()
20499        }
20500    }
20501}
20502#[doc = "A certain mission item has been reached. The system will either hold this position (or circle on the orbit) or (if the autocontinue on the WP was set) continue to the next waypoint."]
20503#[doc = ""]
20504#[doc = "ID: 46"]
20505#[derive(Debug, Clone, PartialEq)]
20506#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20507#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20508pub struct MISSION_ITEM_REACHED_DATA {
20509    #[doc = "Sequence"]
20510    pub seq: u16,
20511}
20512impl MISSION_ITEM_REACHED_DATA {
20513    pub const ENCODED_LEN: usize = 2usize;
20514    pub const DEFAULT: Self = Self { seq: 0_u16 };
20515    #[cfg(feature = "arbitrary")]
20516    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20517        use arbitrary::{Arbitrary, Unstructured};
20518        let mut buf = [0u8; 1024];
20519        rng.fill_bytes(&mut buf);
20520        let mut unstructured = Unstructured::new(&buf);
20521        Self::arbitrary(&mut unstructured).unwrap_or_default()
20522    }
20523}
20524impl Default for MISSION_ITEM_REACHED_DATA {
20525    fn default() -> Self {
20526        Self::DEFAULT.clone()
20527    }
20528}
20529impl MessageData for MISSION_ITEM_REACHED_DATA {
20530    type Message = MavMessage;
20531    const ID: u32 = 46u32;
20532    const NAME: &'static str = "MISSION_ITEM_REACHED";
20533    const EXTRA_CRC: u8 = 11u8;
20534    const ENCODED_LEN: usize = 2usize;
20535    fn deser(
20536        _version: MavlinkVersion,
20537        __input: &[u8],
20538    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20539        let avail_len = __input.len();
20540        let mut payload_buf = [0; Self::ENCODED_LEN];
20541        let mut buf = if avail_len < Self::ENCODED_LEN {
20542            payload_buf[0..avail_len].copy_from_slice(__input);
20543            Bytes::new(&payload_buf)
20544        } else {
20545            Bytes::new(__input)
20546        };
20547        let mut __struct = Self::default();
20548        __struct.seq = buf.get_u16_le();
20549        Ok(__struct)
20550    }
20551    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20552        let mut __tmp = BytesMut::new(bytes);
20553        #[allow(clippy::absurd_extreme_comparisons)]
20554        #[allow(unused_comparisons)]
20555        if __tmp.remaining() < Self::ENCODED_LEN {
20556            panic!(
20557                "buffer is too small (need {} bytes, but got {})",
20558                Self::ENCODED_LEN,
20559                __tmp.remaining(),
20560            )
20561        }
20562        __tmp.put_u16_le(self.seq);
20563        if matches!(version, MavlinkVersion::V2) {
20564            let len = __tmp.len();
20565            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20566        } else {
20567            __tmp.len()
20568        }
20569    }
20570}
20571#[deprecated = "A system that gets this request should respond with MISSION_ITEM_INT (as though MISSION_REQUEST_INT was received). See `MISSION_REQUEST_INT` (Deprecated since 2020-06)"]
20572#[doc = "Request the information of the mission item with the sequence number seq. The response of the system to this message should be a MISSION_ITEM message. <https://mavlink.io/en/services/mission.html>."]
20573#[doc = ""]
20574#[doc = "ID: 40"]
20575#[derive(Debug, Clone, PartialEq)]
20576#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20577#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20578pub struct MISSION_REQUEST_DATA {
20579    #[doc = "Sequence"]
20580    pub seq: u16,
20581    #[doc = "System ID"]
20582    pub target_system: u8,
20583    #[doc = "Component ID"]
20584    pub target_component: u8,
20585    #[doc = "Mission type."]
20586    #[cfg_attr(feature = "serde", serde(default))]
20587    pub mission_type: MavMissionType,
20588}
20589impl MISSION_REQUEST_DATA {
20590    pub const ENCODED_LEN: usize = 5usize;
20591    pub const DEFAULT: Self = Self {
20592        seq: 0_u16,
20593        target_system: 0_u8,
20594        target_component: 0_u8,
20595        mission_type: MavMissionType::DEFAULT,
20596    };
20597    #[cfg(feature = "arbitrary")]
20598    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20599        use arbitrary::{Arbitrary, Unstructured};
20600        let mut buf = [0u8; 1024];
20601        rng.fill_bytes(&mut buf);
20602        let mut unstructured = Unstructured::new(&buf);
20603        Self::arbitrary(&mut unstructured).unwrap_or_default()
20604    }
20605}
20606impl Default for MISSION_REQUEST_DATA {
20607    fn default() -> Self {
20608        Self::DEFAULT.clone()
20609    }
20610}
20611impl MessageData for MISSION_REQUEST_DATA {
20612    type Message = MavMessage;
20613    const ID: u32 = 40u32;
20614    const NAME: &'static str = "MISSION_REQUEST";
20615    const EXTRA_CRC: u8 = 230u8;
20616    const ENCODED_LEN: usize = 5usize;
20617    fn deser(
20618        _version: MavlinkVersion,
20619        __input: &[u8],
20620    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20621        let avail_len = __input.len();
20622        let mut payload_buf = [0; Self::ENCODED_LEN];
20623        let mut buf = if avail_len < Self::ENCODED_LEN {
20624            payload_buf[0..avail_len].copy_from_slice(__input);
20625            Bytes::new(&payload_buf)
20626        } else {
20627            Bytes::new(__input)
20628        };
20629        let mut __struct = Self::default();
20630        __struct.seq = buf.get_u16_le();
20631        __struct.target_system = buf.get_u8();
20632        __struct.target_component = buf.get_u8();
20633        let tmp = buf.get_u8();
20634        __struct.mission_type =
20635            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20636                enum_type: "MavMissionType",
20637                value: tmp as u32,
20638            })?;
20639        Ok(__struct)
20640    }
20641    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20642        let mut __tmp = BytesMut::new(bytes);
20643        #[allow(clippy::absurd_extreme_comparisons)]
20644        #[allow(unused_comparisons)]
20645        if __tmp.remaining() < Self::ENCODED_LEN {
20646            panic!(
20647                "buffer is too small (need {} bytes, but got {})",
20648                Self::ENCODED_LEN,
20649                __tmp.remaining(),
20650            )
20651        }
20652        __tmp.put_u16_le(self.seq);
20653        __tmp.put_u8(self.target_system);
20654        __tmp.put_u8(self.target_component);
20655        if matches!(version, MavlinkVersion::V2) {
20656            __tmp.put_u8(self.mission_type as u8);
20657            let len = __tmp.len();
20658            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20659        } else {
20660            __tmp.len()
20661        }
20662    }
20663}
20664#[doc = "Request the information of the mission item with the sequence number seq. The response of the system to this message should be a MISSION_ITEM_INT message. <https://mavlink.io/en/services/mission.html>."]
20665#[doc = ""]
20666#[doc = "ID: 51"]
20667#[derive(Debug, Clone, PartialEq)]
20668#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20669#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20670pub struct MISSION_REQUEST_INT_DATA {
20671    #[doc = "Sequence"]
20672    pub seq: u16,
20673    #[doc = "System ID"]
20674    pub target_system: u8,
20675    #[doc = "Component ID"]
20676    pub target_component: u8,
20677    #[doc = "Mission type."]
20678    #[cfg_attr(feature = "serde", serde(default))]
20679    pub mission_type: MavMissionType,
20680}
20681impl MISSION_REQUEST_INT_DATA {
20682    pub const ENCODED_LEN: usize = 5usize;
20683    pub const DEFAULT: Self = Self {
20684        seq: 0_u16,
20685        target_system: 0_u8,
20686        target_component: 0_u8,
20687        mission_type: MavMissionType::DEFAULT,
20688    };
20689    #[cfg(feature = "arbitrary")]
20690    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20691        use arbitrary::{Arbitrary, Unstructured};
20692        let mut buf = [0u8; 1024];
20693        rng.fill_bytes(&mut buf);
20694        let mut unstructured = Unstructured::new(&buf);
20695        Self::arbitrary(&mut unstructured).unwrap_or_default()
20696    }
20697}
20698impl Default for MISSION_REQUEST_INT_DATA {
20699    fn default() -> Self {
20700        Self::DEFAULT.clone()
20701    }
20702}
20703impl MessageData for MISSION_REQUEST_INT_DATA {
20704    type Message = MavMessage;
20705    const ID: u32 = 51u32;
20706    const NAME: &'static str = "MISSION_REQUEST_INT";
20707    const EXTRA_CRC: u8 = 196u8;
20708    const ENCODED_LEN: usize = 5usize;
20709    fn deser(
20710        _version: MavlinkVersion,
20711        __input: &[u8],
20712    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20713        let avail_len = __input.len();
20714        let mut payload_buf = [0; Self::ENCODED_LEN];
20715        let mut buf = if avail_len < Self::ENCODED_LEN {
20716            payload_buf[0..avail_len].copy_from_slice(__input);
20717            Bytes::new(&payload_buf)
20718        } else {
20719            Bytes::new(__input)
20720        };
20721        let mut __struct = Self::default();
20722        __struct.seq = buf.get_u16_le();
20723        __struct.target_system = buf.get_u8();
20724        __struct.target_component = buf.get_u8();
20725        let tmp = buf.get_u8();
20726        __struct.mission_type =
20727            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20728                enum_type: "MavMissionType",
20729                value: tmp as u32,
20730            })?;
20731        Ok(__struct)
20732    }
20733    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20734        let mut __tmp = BytesMut::new(bytes);
20735        #[allow(clippy::absurd_extreme_comparisons)]
20736        #[allow(unused_comparisons)]
20737        if __tmp.remaining() < Self::ENCODED_LEN {
20738            panic!(
20739                "buffer is too small (need {} bytes, but got {})",
20740                Self::ENCODED_LEN,
20741                __tmp.remaining(),
20742            )
20743        }
20744        __tmp.put_u16_le(self.seq);
20745        __tmp.put_u8(self.target_system);
20746        __tmp.put_u8(self.target_component);
20747        if matches!(version, MavlinkVersion::V2) {
20748            __tmp.put_u8(self.mission_type as u8);
20749            let len = __tmp.len();
20750            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20751        } else {
20752            __tmp.len()
20753        }
20754    }
20755}
20756#[doc = "Request the overall list of mission items from the system/component."]
20757#[doc = ""]
20758#[doc = "ID: 43"]
20759#[derive(Debug, Clone, PartialEq)]
20760#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20761#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20762pub struct MISSION_REQUEST_LIST_DATA {
20763    #[doc = "System ID"]
20764    pub target_system: u8,
20765    #[doc = "Component ID"]
20766    pub target_component: u8,
20767    #[doc = "Mission type."]
20768    #[cfg_attr(feature = "serde", serde(default))]
20769    pub mission_type: MavMissionType,
20770}
20771impl MISSION_REQUEST_LIST_DATA {
20772    pub const ENCODED_LEN: usize = 3usize;
20773    pub const DEFAULT: Self = Self {
20774        target_system: 0_u8,
20775        target_component: 0_u8,
20776        mission_type: MavMissionType::DEFAULT,
20777    };
20778    #[cfg(feature = "arbitrary")]
20779    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20780        use arbitrary::{Arbitrary, Unstructured};
20781        let mut buf = [0u8; 1024];
20782        rng.fill_bytes(&mut buf);
20783        let mut unstructured = Unstructured::new(&buf);
20784        Self::arbitrary(&mut unstructured).unwrap_or_default()
20785    }
20786}
20787impl Default for MISSION_REQUEST_LIST_DATA {
20788    fn default() -> Self {
20789        Self::DEFAULT.clone()
20790    }
20791}
20792impl MessageData for MISSION_REQUEST_LIST_DATA {
20793    type Message = MavMessage;
20794    const ID: u32 = 43u32;
20795    const NAME: &'static str = "MISSION_REQUEST_LIST";
20796    const EXTRA_CRC: u8 = 132u8;
20797    const ENCODED_LEN: usize = 3usize;
20798    fn deser(
20799        _version: MavlinkVersion,
20800        __input: &[u8],
20801    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20802        let avail_len = __input.len();
20803        let mut payload_buf = [0; Self::ENCODED_LEN];
20804        let mut buf = if avail_len < Self::ENCODED_LEN {
20805            payload_buf[0..avail_len].copy_from_slice(__input);
20806            Bytes::new(&payload_buf)
20807        } else {
20808            Bytes::new(__input)
20809        };
20810        let mut __struct = Self::default();
20811        __struct.target_system = buf.get_u8();
20812        __struct.target_component = buf.get_u8();
20813        let tmp = buf.get_u8();
20814        __struct.mission_type =
20815            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20816                enum_type: "MavMissionType",
20817                value: tmp as u32,
20818            })?;
20819        Ok(__struct)
20820    }
20821    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20822        let mut __tmp = BytesMut::new(bytes);
20823        #[allow(clippy::absurd_extreme_comparisons)]
20824        #[allow(unused_comparisons)]
20825        if __tmp.remaining() < Self::ENCODED_LEN {
20826            panic!(
20827                "buffer is too small (need {} bytes, but got {})",
20828                Self::ENCODED_LEN,
20829                __tmp.remaining(),
20830            )
20831        }
20832        __tmp.put_u8(self.target_system);
20833        __tmp.put_u8(self.target_component);
20834        if matches!(version, MavlinkVersion::V2) {
20835            __tmp.put_u8(self.mission_type as u8);
20836            let len = __tmp.len();
20837            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20838        } else {
20839            __tmp.len()
20840        }
20841    }
20842}
20843#[doc = "Request a partial list of mission items from the system/component. <https://mavlink.io/en/services/mission.html>. If start and end index are the same, just send one waypoint."]
20844#[doc = ""]
20845#[doc = "ID: 37"]
20846#[derive(Debug, Clone, PartialEq)]
20847#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20848#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20849pub struct MISSION_REQUEST_PARTIAL_LIST_DATA {
20850    #[doc = "Start index"]
20851    pub start_index: i16,
20852    #[doc = "End index, -1 by default (-1: send list to end). Else a valid index of the list"]
20853    pub end_index: i16,
20854    #[doc = "System ID"]
20855    pub target_system: u8,
20856    #[doc = "Component ID"]
20857    pub target_component: u8,
20858    #[doc = "Mission type."]
20859    #[cfg_attr(feature = "serde", serde(default))]
20860    pub mission_type: MavMissionType,
20861}
20862impl MISSION_REQUEST_PARTIAL_LIST_DATA {
20863    pub const ENCODED_LEN: usize = 7usize;
20864    pub const DEFAULT: Self = Self {
20865        start_index: 0_i16,
20866        end_index: 0_i16,
20867        target_system: 0_u8,
20868        target_component: 0_u8,
20869        mission_type: MavMissionType::DEFAULT,
20870    };
20871    #[cfg(feature = "arbitrary")]
20872    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20873        use arbitrary::{Arbitrary, Unstructured};
20874        let mut buf = [0u8; 1024];
20875        rng.fill_bytes(&mut buf);
20876        let mut unstructured = Unstructured::new(&buf);
20877        Self::arbitrary(&mut unstructured).unwrap_or_default()
20878    }
20879}
20880impl Default for MISSION_REQUEST_PARTIAL_LIST_DATA {
20881    fn default() -> Self {
20882        Self::DEFAULT.clone()
20883    }
20884}
20885impl MessageData for MISSION_REQUEST_PARTIAL_LIST_DATA {
20886    type Message = MavMessage;
20887    const ID: u32 = 37u32;
20888    const NAME: &'static str = "MISSION_REQUEST_PARTIAL_LIST";
20889    const EXTRA_CRC: u8 = 212u8;
20890    const ENCODED_LEN: usize = 7usize;
20891    fn deser(
20892        _version: MavlinkVersion,
20893        __input: &[u8],
20894    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20895        let avail_len = __input.len();
20896        let mut payload_buf = [0; Self::ENCODED_LEN];
20897        let mut buf = if avail_len < Self::ENCODED_LEN {
20898            payload_buf[0..avail_len].copy_from_slice(__input);
20899            Bytes::new(&payload_buf)
20900        } else {
20901            Bytes::new(__input)
20902        };
20903        let mut __struct = Self::default();
20904        __struct.start_index = buf.get_i16_le();
20905        __struct.end_index = buf.get_i16_le();
20906        __struct.target_system = buf.get_u8();
20907        __struct.target_component = buf.get_u8();
20908        let tmp = buf.get_u8();
20909        __struct.mission_type =
20910            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20911                enum_type: "MavMissionType",
20912                value: tmp as u32,
20913            })?;
20914        Ok(__struct)
20915    }
20916    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20917        let mut __tmp = BytesMut::new(bytes);
20918        #[allow(clippy::absurd_extreme_comparisons)]
20919        #[allow(unused_comparisons)]
20920        if __tmp.remaining() < Self::ENCODED_LEN {
20921            panic!(
20922                "buffer is too small (need {} bytes, but got {})",
20923                Self::ENCODED_LEN,
20924                __tmp.remaining(),
20925            )
20926        }
20927        __tmp.put_i16_le(self.start_index);
20928        __tmp.put_i16_le(self.end_index);
20929        __tmp.put_u8(self.target_system);
20930        __tmp.put_u8(self.target_component);
20931        if matches!(version, MavlinkVersion::V2) {
20932            __tmp.put_u8(self.mission_type as u8);
20933            let len = __tmp.len();
20934            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20935        } else {
20936            __tmp.len()
20937        }
20938    }
20939}
20940#[deprecated = " See `MAV_CMD_DO_SET_MISSION_CURRENT` (Deprecated since 2022-08)"]
20941#[doc = "Set the mission item with sequence number seq as the current item and emit MISSION_CURRENT (whether or not the mission number changed).         If a mission is currently being executed, the system will continue to this new mission item on the shortest path, skipping any intermediate mission items.         Note that mission jump repeat counters are not reset (see MAV_CMD_DO_JUMP param2).          This message may trigger a mission state-machine change on some systems: for example from MISSION_STATE_NOT_STARTED or MISSION_STATE_PAUSED to MISSION_STATE_ACTIVE.         If the system is in mission mode, on those systems this command might therefore start, restart or resume the mission.         If the system is not in mission mode this message must not trigger a switch to mission mode."]
20942#[doc = ""]
20943#[doc = "ID: 41"]
20944#[derive(Debug, Clone, PartialEq)]
20945#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20946#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20947pub struct MISSION_SET_CURRENT_DATA {
20948    #[doc = "Sequence"]
20949    pub seq: u16,
20950    #[doc = "System ID"]
20951    pub target_system: u8,
20952    #[doc = "Component ID"]
20953    pub target_component: u8,
20954}
20955impl MISSION_SET_CURRENT_DATA {
20956    pub const ENCODED_LEN: usize = 4usize;
20957    pub const DEFAULT: Self = Self {
20958        seq: 0_u16,
20959        target_system: 0_u8,
20960        target_component: 0_u8,
20961    };
20962    #[cfg(feature = "arbitrary")]
20963    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20964        use arbitrary::{Arbitrary, Unstructured};
20965        let mut buf = [0u8; 1024];
20966        rng.fill_bytes(&mut buf);
20967        let mut unstructured = Unstructured::new(&buf);
20968        Self::arbitrary(&mut unstructured).unwrap_or_default()
20969    }
20970}
20971impl Default for MISSION_SET_CURRENT_DATA {
20972    fn default() -> Self {
20973        Self::DEFAULT.clone()
20974    }
20975}
20976impl MessageData for MISSION_SET_CURRENT_DATA {
20977    type Message = MavMessage;
20978    const ID: u32 = 41u32;
20979    const NAME: &'static str = "MISSION_SET_CURRENT";
20980    const EXTRA_CRC: u8 = 28u8;
20981    const ENCODED_LEN: usize = 4usize;
20982    fn deser(
20983        _version: MavlinkVersion,
20984        __input: &[u8],
20985    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20986        let avail_len = __input.len();
20987        let mut payload_buf = [0; Self::ENCODED_LEN];
20988        let mut buf = if avail_len < Self::ENCODED_LEN {
20989            payload_buf[0..avail_len].copy_from_slice(__input);
20990            Bytes::new(&payload_buf)
20991        } else {
20992            Bytes::new(__input)
20993        };
20994        let mut __struct = Self::default();
20995        __struct.seq = buf.get_u16_le();
20996        __struct.target_system = buf.get_u8();
20997        __struct.target_component = buf.get_u8();
20998        Ok(__struct)
20999    }
21000    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21001        let mut __tmp = BytesMut::new(bytes);
21002        #[allow(clippy::absurd_extreme_comparisons)]
21003        #[allow(unused_comparisons)]
21004        if __tmp.remaining() < Self::ENCODED_LEN {
21005            panic!(
21006                "buffer is too small (need {} bytes, but got {})",
21007                Self::ENCODED_LEN,
21008                __tmp.remaining(),
21009            )
21010        }
21011        __tmp.put_u16_le(self.seq);
21012        __tmp.put_u8(self.target_system);
21013        __tmp.put_u8(self.target_component);
21014        if matches!(version, MavlinkVersion::V2) {
21015            let len = __tmp.len();
21016            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21017        } else {
21018            __tmp.len()
21019        }
21020    }
21021}
21022#[doc = "This message is sent to the MAV to write a partial list. If start index == end index, only one item will be transmitted / updated. If the start index is NOT 0 and above the current list size, this request should be REJECTED!."]
21023#[doc = ""]
21024#[doc = "ID: 38"]
21025#[derive(Debug, Clone, PartialEq)]
21026#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21027#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21028pub struct MISSION_WRITE_PARTIAL_LIST_DATA {
21029    #[doc = "Start index. Must be smaller / equal to the largest index of the current onboard list."]
21030    pub start_index: i16,
21031    #[doc = "End index, equal or greater than start index."]
21032    pub end_index: i16,
21033    #[doc = "System ID"]
21034    pub target_system: u8,
21035    #[doc = "Component ID"]
21036    pub target_component: u8,
21037    #[doc = "Mission type."]
21038    #[cfg_attr(feature = "serde", serde(default))]
21039    pub mission_type: MavMissionType,
21040}
21041impl MISSION_WRITE_PARTIAL_LIST_DATA {
21042    pub const ENCODED_LEN: usize = 7usize;
21043    pub const DEFAULT: Self = Self {
21044        start_index: 0_i16,
21045        end_index: 0_i16,
21046        target_system: 0_u8,
21047        target_component: 0_u8,
21048        mission_type: MavMissionType::DEFAULT,
21049    };
21050    #[cfg(feature = "arbitrary")]
21051    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21052        use arbitrary::{Arbitrary, Unstructured};
21053        let mut buf = [0u8; 1024];
21054        rng.fill_bytes(&mut buf);
21055        let mut unstructured = Unstructured::new(&buf);
21056        Self::arbitrary(&mut unstructured).unwrap_or_default()
21057    }
21058}
21059impl Default for MISSION_WRITE_PARTIAL_LIST_DATA {
21060    fn default() -> Self {
21061        Self::DEFAULT.clone()
21062    }
21063}
21064impl MessageData for MISSION_WRITE_PARTIAL_LIST_DATA {
21065    type Message = MavMessage;
21066    const ID: u32 = 38u32;
21067    const NAME: &'static str = "MISSION_WRITE_PARTIAL_LIST";
21068    const EXTRA_CRC: u8 = 9u8;
21069    const ENCODED_LEN: usize = 7usize;
21070    fn deser(
21071        _version: MavlinkVersion,
21072        __input: &[u8],
21073    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21074        let avail_len = __input.len();
21075        let mut payload_buf = [0; Self::ENCODED_LEN];
21076        let mut buf = if avail_len < Self::ENCODED_LEN {
21077            payload_buf[0..avail_len].copy_from_slice(__input);
21078            Bytes::new(&payload_buf)
21079        } else {
21080            Bytes::new(__input)
21081        };
21082        let mut __struct = Self::default();
21083        __struct.start_index = buf.get_i16_le();
21084        __struct.end_index = buf.get_i16_le();
21085        __struct.target_system = buf.get_u8();
21086        __struct.target_component = buf.get_u8();
21087        let tmp = buf.get_u8();
21088        __struct.mission_type =
21089            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21090                enum_type: "MavMissionType",
21091                value: tmp as u32,
21092            })?;
21093        Ok(__struct)
21094    }
21095    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21096        let mut __tmp = BytesMut::new(bytes);
21097        #[allow(clippy::absurd_extreme_comparisons)]
21098        #[allow(unused_comparisons)]
21099        if __tmp.remaining() < Self::ENCODED_LEN {
21100            panic!(
21101                "buffer is too small (need {} bytes, but got {})",
21102                Self::ENCODED_LEN,
21103                __tmp.remaining(),
21104            )
21105        }
21106        __tmp.put_i16_le(self.start_index);
21107        __tmp.put_i16_le(self.end_index);
21108        __tmp.put_u8(self.target_system);
21109        __tmp.put_u8(self.target_component);
21110        if matches!(version, MavlinkVersion::V2) {
21111            __tmp.put_u8(self.mission_type as u8);
21112            let len = __tmp.len();
21113            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21114        } else {
21115            __tmp.len()
21116        }
21117    }
21118}
21119#[deprecated = "This message is being superseded by MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW. The message can still be used to communicate with legacy gimbals implementing it. See `MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW` (Deprecated since 2020-01)"]
21120#[doc = "Orientation of a mount."]
21121#[doc = ""]
21122#[doc = "ID: 265"]
21123#[derive(Debug, Clone, PartialEq)]
21124#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21125#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21126pub struct MOUNT_ORIENTATION_DATA {
21127    #[doc = "Timestamp (time since system boot)."]
21128    pub time_boot_ms: u32,
21129    #[doc = "Roll in global frame (set to NaN for invalid)."]
21130    pub roll: f32,
21131    #[doc = "Pitch in global frame (set to NaN for invalid)."]
21132    pub pitch: f32,
21133    #[doc = "Yaw relative to vehicle (set to NaN for invalid)."]
21134    pub yaw: f32,
21135    #[doc = "Yaw in absolute frame relative to Earth's North, north is 0 (set to NaN for invalid)."]
21136    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
21137    pub yaw_absolute: f32,
21138}
21139impl MOUNT_ORIENTATION_DATA {
21140    pub const ENCODED_LEN: usize = 20usize;
21141    pub const DEFAULT: Self = Self {
21142        time_boot_ms: 0_u32,
21143        roll: 0.0_f32,
21144        pitch: 0.0_f32,
21145        yaw: 0.0_f32,
21146        yaw_absolute: 0.0_f32,
21147    };
21148    #[cfg(feature = "arbitrary")]
21149    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21150        use arbitrary::{Arbitrary, Unstructured};
21151        let mut buf = [0u8; 1024];
21152        rng.fill_bytes(&mut buf);
21153        let mut unstructured = Unstructured::new(&buf);
21154        Self::arbitrary(&mut unstructured).unwrap_or_default()
21155    }
21156}
21157impl Default for MOUNT_ORIENTATION_DATA {
21158    fn default() -> Self {
21159        Self::DEFAULT.clone()
21160    }
21161}
21162impl MessageData for MOUNT_ORIENTATION_DATA {
21163    type Message = MavMessage;
21164    const ID: u32 = 265u32;
21165    const NAME: &'static str = "MOUNT_ORIENTATION";
21166    const EXTRA_CRC: u8 = 26u8;
21167    const ENCODED_LEN: usize = 20usize;
21168    fn deser(
21169        _version: MavlinkVersion,
21170        __input: &[u8],
21171    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21172        let avail_len = __input.len();
21173        let mut payload_buf = [0; Self::ENCODED_LEN];
21174        let mut buf = if avail_len < Self::ENCODED_LEN {
21175            payload_buf[0..avail_len].copy_from_slice(__input);
21176            Bytes::new(&payload_buf)
21177        } else {
21178            Bytes::new(__input)
21179        };
21180        let mut __struct = Self::default();
21181        __struct.time_boot_ms = buf.get_u32_le();
21182        __struct.roll = buf.get_f32_le();
21183        __struct.pitch = buf.get_f32_le();
21184        __struct.yaw = buf.get_f32_le();
21185        __struct.yaw_absolute = buf.get_f32_le();
21186        Ok(__struct)
21187    }
21188    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21189        let mut __tmp = BytesMut::new(bytes);
21190        #[allow(clippy::absurd_extreme_comparisons)]
21191        #[allow(unused_comparisons)]
21192        if __tmp.remaining() < Self::ENCODED_LEN {
21193            panic!(
21194                "buffer is too small (need {} bytes, but got {})",
21195                Self::ENCODED_LEN,
21196                __tmp.remaining(),
21197            )
21198        }
21199        __tmp.put_u32_le(self.time_boot_ms);
21200        __tmp.put_f32_le(self.roll);
21201        __tmp.put_f32_le(self.pitch);
21202        __tmp.put_f32_le(self.yaw);
21203        if matches!(version, MavlinkVersion::V2) {
21204            __tmp.put_f32_le(self.yaw_absolute);
21205            let len = __tmp.len();
21206            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21207        } else {
21208            __tmp.len()
21209        }
21210    }
21211}
21212#[doc = "Send a key-value pair as float. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
21213#[doc = ""]
21214#[doc = "ID: 251"]
21215#[derive(Debug, Clone, PartialEq)]
21216#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21217#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21218pub struct NAMED_VALUE_FLOAT_DATA {
21219    #[doc = "Timestamp (time since system boot)."]
21220    pub time_boot_ms: u32,
21221    #[doc = "Floating point value"]
21222    pub value: f32,
21223    #[doc = "Name of the debug variable"]
21224    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21225    pub name: [u8; 10],
21226}
21227impl NAMED_VALUE_FLOAT_DATA {
21228    pub const ENCODED_LEN: usize = 18usize;
21229    pub const DEFAULT: Self = Self {
21230        time_boot_ms: 0_u32,
21231        value: 0.0_f32,
21232        name: [0_u8; 10usize],
21233    };
21234    #[cfg(feature = "arbitrary")]
21235    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21236        use arbitrary::{Arbitrary, Unstructured};
21237        let mut buf = [0u8; 1024];
21238        rng.fill_bytes(&mut buf);
21239        let mut unstructured = Unstructured::new(&buf);
21240        Self::arbitrary(&mut unstructured).unwrap_or_default()
21241    }
21242}
21243impl Default for NAMED_VALUE_FLOAT_DATA {
21244    fn default() -> Self {
21245        Self::DEFAULT.clone()
21246    }
21247}
21248impl MessageData for NAMED_VALUE_FLOAT_DATA {
21249    type Message = MavMessage;
21250    const ID: u32 = 251u32;
21251    const NAME: &'static str = "NAMED_VALUE_FLOAT";
21252    const EXTRA_CRC: u8 = 170u8;
21253    const ENCODED_LEN: usize = 18usize;
21254    fn deser(
21255        _version: MavlinkVersion,
21256        __input: &[u8],
21257    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21258        let avail_len = __input.len();
21259        let mut payload_buf = [0; Self::ENCODED_LEN];
21260        let mut buf = if avail_len < Self::ENCODED_LEN {
21261            payload_buf[0..avail_len].copy_from_slice(__input);
21262            Bytes::new(&payload_buf)
21263        } else {
21264            Bytes::new(__input)
21265        };
21266        let mut __struct = Self::default();
21267        __struct.time_boot_ms = buf.get_u32_le();
21268        __struct.value = buf.get_f32_le();
21269        for v in &mut __struct.name {
21270            let val = buf.get_u8();
21271            *v = val;
21272        }
21273        Ok(__struct)
21274    }
21275    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21276        let mut __tmp = BytesMut::new(bytes);
21277        #[allow(clippy::absurd_extreme_comparisons)]
21278        #[allow(unused_comparisons)]
21279        if __tmp.remaining() < Self::ENCODED_LEN {
21280            panic!(
21281                "buffer is too small (need {} bytes, but got {})",
21282                Self::ENCODED_LEN,
21283                __tmp.remaining(),
21284            )
21285        }
21286        __tmp.put_u32_le(self.time_boot_ms);
21287        __tmp.put_f32_le(self.value);
21288        for val in &self.name {
21289            __tmp.put_u8(*val);
21290        }
21291        if matches!(version, MavlinkVersion::V2) {
21292            let len = __tmp.len();
21293            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21294        } else {
21295            __tmp.len()
21296        }
21297    }
21298}
21299#[doc = "Send a key-value pair as integer. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
21300#[doc = ""]
21301#[doc = "ID: 252"]
21302#[derive(Debug, Clone, PartialEq)]
21303#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21304#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21305pub struct NAMED_VALUE_INT_DATA {
21306    #[doc = "Timestamp (time since system boot)."]
21307    pub time_boot_ms: u32,
21308    #[doc = "Signed integer value"]
21309    pub value: i32,
21310    #[doc = "Name of the debug variable"]
21311    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21312    pub name: [u8; 10],
21313}
21314impl NAMED_VALUE_INT_DATA {
21315    pub const ENCODED_LEN: usize = 18usize;
21316    pub const DEFAULT: Self = Self {
21317        time_boot_ms: 0_u32,
21318        value: 0_i32,
21319        name: [0_u8; 10usize],
21320    };
21321    #[cfg(feature = "arbitrary")]
21322    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21323        use arbitrary::{Arbitrary, Unstructured};
21324        let mut buf = [0u8; 1024];
21325        rng.fill_bytes(&mut buf);
21326        let mut unstructured = Unstructured::new(&buf);
21327        Self::arbitrary(&mut unstructured).unwrap_or_default()
21328    }
21329}
21330impl Default for NAMED_VALUE_INT_DATA {
21331    fn default() -> Self {
21332        Self::DEFAULT.clone()
21333    }
21334}
21335impl MessageData for NAMED_VALUE_INT_DATA {
21336    type Message = MavMessage;
21337    const ID: u32 = 252u32;
21338    const NAME: &'static str = "NAMED_VALUE_INT";
21339    const EXTRA_CRC: u8 = 44u8;
21340    const ENCODED_LEN: usize = 18usize;
21341    fn deser(
21342        _version: MavlinkVersion,
21343        __input: &[u8],
21344    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21345        let avail_len = __input.len();
21346        let mut payload_buf = [0; Self::ENCODED_LEN];
21347        let mut buf = if avail_len < Self::ENCODED_LEN {
21348            payload_buf[0..avail_len].copy_from_slice(__input);
21349            Bytes::new(&payload_buf)
21350        } else {
21351            Bytes::new(__input)
21352        };
21353        let mut __struct = Self::default();
21354        __struct.time_boot_ms = buf.get_u32_le();
21355        __struct.value = buf.get_i32_le();
21356        for v in &mut __struct.name {
21357            let val = buf.get_u8();
21358            *v = val;
21359        }
21360        Ok(__struct)
21361    }
21362    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21363        let mut __tmp = BytesMut::new(bytes);
21364        #[allow(clippy::absurd_extreme_comparisons)]
21365        #[allow(unused_comparisons)]
21366        if __tmp.remaining() < Self::ENCODED_LEN {
21367            panic!(
21368                "buffer is too small (need {} bytes, but got {})",
21369                Self::ENCODED_LEN,
21370                __tmp.remaining(),
21371            )
21372        }
21373        __tmp.put_u32_le(self.time_boot_ms);
21374        __tmp.put_i32_le(self.value);
21375        for val in &self.name {
21376            __tmp.put_u8(*val);
21377        }
21378        if matches!(version, MavlinkVersion::V2) {
21379            let len = __tmp.len();
21380            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21381        } else {
21382            __tmp.len()
21383        }
21384    }
21385}
21386#[doc = "The state of the navigation and position controller."]
21387#[doc = ""]
21388#[doc = "ID: 62"]
21389#[derive(Debug, Clone, PartialEq)]
21390#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21391#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21392pub struct NAV_CONTROLLER_OUTPUT_DATA {
21393    #[doc = "Current desired roll"]
21394    pub nav_roll: f32,
21395    #[doc = "Current desired pitch"]
21396    pub nav_pitch: f32,
21397    #[doc = "Current altitude error"]
21398    pub alt_error: f32,
21399    #[doc = "Current airspeed error"]
21400    pub aspd_error: f32,
21401    #[doc = "Current crosstrack error on x-y plane"]
21402    pub xtrack_error: f32,
21403    #[doc = "Current desired heading"]
21404    pub nav_bearing: i16,
21405    #[doc = "Bearing to current waypoint/target"]
21406    pub target_bearing: i16,
21407    #[doc = "Distance to active waypoint"]
21408    pub wp_dist: u16,
21409}
21410impl NAV_CONTROLLER_OUTPUT_DATA {
21411    pub const ENCODED_LEN: usize = 26usize;
21412    pub const DEFAULT: Self = Self {
21413        nav_roll: 0.0_f32,
21414        nav_pitch: 0.0_f32,
21415        alt_error: 0.0_f32,
21416        aspd_error: 0.0_f32,
21417        xtrack_error: 0.0_f32,
21418        nav_bearing: 0_i16,
21419        target_bearing: 0_i16,
21420        wp_dist: 0_u16,
21421    };
21422    #[cfg(feature = "arbitrary")]
21423    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21424        use arbitrary::{Arbitrary, Unstructured};
21425        let mut buf = [0u8; 1024];
21426        rng.fill_bytes(&mut buf);
21427        let mut unstructured = Unstructured::new(&buf);
21428        Self::arbitrary(&mut unstructured).unwrap_or_default()
21429    }
21430}
21431impl Default for NAV_CONTROLLER_OUTPUT_DATA {
21432    fn default() -> Self {
21433        Self::DEFAULT.clone()
21434    }
21435}
21436impl MessageData for NAV_CONTROLLER_OUTPUT_DATA {
21437    type Message = MavMessage;
21438    const ID: u32 = 62u32;
21439    const NAME: &'static str = "NAV_CONTROLLER_OUTPUT";
21440    const EXTRA_CRC: u8 = 183u8;
21441    const ENCODED_LEN: usize = 26usize;
21442    fn deser(
21443        _version: MavlinkVersion,
21444        __input: &[u8],
21445    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21446        let avail_len = __input.len();
21447        let mut payload_buf = [0; Self::ENCODED_LEN];
21448        let mut buf = if avail_len < Self::ENCODED_LEN {
21449            payload_buf[0..avail_len].copy_from_slice(__input);
21450            Bytes::new(&payload_buf)
21451        } else {
21452            Bytes::new(__input)
21453        };
21454        let mut __struct = Self::default();
21455        __struct.nav_roll = buf.get_f32_le();
21456        __struct.nav_pitch = buf.get_f32_le();
21457        __struct.alt_error = buf.get_f32_le();
21458        __struct.aspd_error = buf.get_f32_le();
21459        __struct.xtrack_error = buf.get_f32_le();
21460        __struct.nav_bearing = buf.get_i16_le();
21461        __struct.target_bearing = buf.get_i16_le();
21462        __struct.wp_dist = buf.get_u16_le();
21463        Ok(__struct)
21464    }
21465    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21466        let mut __tmp = BytesMut::new(bytes);
21467        #[allow(clippy::absurd_extreme_comparisons)]
21468        #[allow(unused_comparisons)]
21469        if __tmp.remaining() < Self::ENCODED_LEN {
21470            panic!(
21471                "buffer is too small (need {} bytes, but got {})",
21472                Self::ENCODED_LEN,
21473                __tmp.remaining(),
21474            )
21475        }
21476        __tmp.put_f32_le(self.nav_roll);
21477        __tmp.put_f32_le(self.nav_pitch);
21478        __tmp.put_f32_le(self.alt_error);
21479        __tmp.put_f32_le(self.aspd_error);
21480        __tmp.put_f32_le(self.xtrack_error);
21481        __tmp.put_i16_le(self.nav_bearing);
21482        __tmp.put_i16_le(self.target_bearing);
21483        __tmp.put_u16_le(self.wp_dist);
21484        if matches!(version, MavlinkVersion::V2) {
21485            let len = __tmp.len();
21486            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21487        } else {
21488            __tmp.len()
21489        }
21490    }
21491}
21492#[doc = "Obstacle distances in front of the sensor, starting from the left in increment degrees to the right."]
21493#[doc = ""]
21494#[doc = "ID: 330"]
21495#[derive(Debug, Clone, PartialEq)]
21496#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21497#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21498pub struct OBSTACLE_DISTANCE_DATA {
21499    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
21500    pub time_usec: u64,
21501    #[doc = "Distance of obstacles around the vehicle with index 0 corresponding to north + angle_offset, unless otherwise specified in the frame. A value of 0 is valid and means that the obstacle is practically touching the sensor. A value of max_distance +1 means no obstacle is present. A value of UINT16_MAX for unknown/not used. In a array element, one unit corresponds to 1cm."]
21502    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21503    pub distances: [u16; 72],
21504    #[doc = "Minimum distance the sensor can measure."]
21505    pub min_distance: u16,
21506    #[doc = "Maximum distance the sensor can measure."]
21507    pub max_distance: u16,
21508    #[doc = "Class id of the distance sensor type."]
21509    pub sensor_type: MavDistanceSensor,
21510    #[doc = "Angular width in degrees of each array element. Increment direction is clockwise. This field is ignored if increment_f is non-zero."]
21511    pub increment: u8,
21512    #[doc = "Angular width in degrees of each array element as a float. If non-zero then this value is used instead of the uint8_t increment field. Positive is clockwise direction, negative is counter-clockwise."]
21513    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
21514    pub increment_f: f32,
21515    #[doc = "Relative angle offset of the 0-index element in the distances array. Value of 0 corresponds to forward. Positive is clockwise direction, negative is counter-clockwise."]
21516    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
21517    pub angle_offset: f32,
21518    #[doc = "Coordinate frame of reference for the yaw rotation and offset of the sensor data. Defaults to MAV_FRAME_GLOBAL, which is north aligned. For body-mounted sensors use MAV_FRAME_BODY_FRD, which is vehicle front aligned."]
21519    #[cfg_attr(feature = "serde", serde(default))]
21520    pub frame: MavFrame,
21521}
21522impl OBSTACLE_DISTANCE_DATA {
21523    pub const ENCODED_LEN: usize = 167usize;
21524    pub const DEFAULT: Self = Self {
21525        time_usec: 0_u64,
21526        distances: [0_u16; 72usize],
21527        min_distance: 0_u16,
21528        max_distance: 0_u16,
21529        sensor_type: MavDistanceSensor::DEFAULT,
21530        increment: 0_u8,
21531        increment_f: 0.0_f32,
21532        angle_offset: 0.0_f32,
21533        frame: MavFrame::DEFAULT,
21534    };
21535    #[cfg(feature = "arbitrary")]
21536    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21537        use arbitrary::{Arbitrary, Unstructured};
21538        let mut buf = [0u8; 1024];
21539        rng.fill_bytes(&mut buf);
21540        let mut unstructured = Unstructured::new(&buf);
21541        Self::arbitrary(&mut unstructured).unwrap_or_default()
21542    }
21543}
21544impl Default for OBSTACLE_DISTANCE_DATA {
21545    fn default() -> Self {
21546        Self::DEFAULT.clone()
21547    }
21548}
21549impl MessageData for OBSTACLE_DISTANCE_DATA {
21550    type Message = MavMessage;
21551    const ID: u32 = 330u32;
21552    const NAME: &'static str = "OBSTACLE_DISTANCE";
21553    const EXTRA_CRC: u8 = 23u8;
21554    const ENCODED_LEN: usize = 167usize;
21555    fn deser(
21556        _version: MavlinkVersion,
21557        __input: &[u8],
21558    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21559        let avail_len = __input.len();
21560        let mut payload_buf = [0; Self::ENCODED_LEN];
21561        let mut buf = if avail_len < Self::ENCODED_LEN {
21562            payload_buf[0..avail_len].copy_from_slice(__input);
21563            Bytes::new(&payload_buf)
21564        } else {
21565            Bytes::new(__input)
21566        };
21567        let mut __struct = Self::default();
21568        __struct.time_usec = buf.get_u64_le();
21569        for v in &mut __struct.distances {
21570            let val = buf.get_u16_le();
21571            *v = val;
21572        }
21573        __struct.min_distance = buf.get_u16_le();
21574        __struct.max_distance = buf.get_u16_le();
21575        let tmp = buf.get_u8();
21576        __struct.sensor_type =
21577            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21578                enum_type: "MavDistanceSensor",
21579                value: tmp as u32,
21580            })?;
21581        __struct.increment = buf.get_u8();
21582        __struct.increment_f = buf.get_f32_le();
21583        __struct.angle_offset = buf.get_f32_le();
21584        let tmp = buf.get_u8();
21585        __struct.frame =
21586            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21587                enum_type: "MavFrame",
21588                value: tmp as u32,
21589            })?;
21590        Ok(__struct)
21591    }
21592    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21593        let mut __tmp = BytesMut::new(bytes);
21594        #[allow(clippy::absurd_extreme_comparisons)]
21595        #[allow(unused_comparisons)]
21596        if __tmp.remaining() < Self::ENCODED_LEN {
21597            panic!(
21598                "buffer is too small (need {} bytes, but got {})",
21599                Self::ENCODED_LEN,
21600                __tmp.remaining(),
21601            )
21602        }
21603        __tmp.put_u64_le(self.time_usec);
21604        for val in &self.distances {
21605            __tmp.put_u16_le(*val);
21606        }
21607        __tmp.put_u16_le(self.min_distance);
21608        __tmp.put_u16_le(self.max_distance);
21609        __tmp.put_u8(self.sensor_type as u8);
21610        __tmp.put_u8(self.increment);
21611        if matches!(version, MavlinkVersion::V2) {
21612            __tmp.put_f32_le(self.increment_f);
21613            __tmp.put_f32_le(self.angle_offset);
21614            __tmp.put_u8(self.frame as u8);
21615            let len = __tmp.len();
21616            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21617        } else {
21618            __tmp.len()
21619        }
21620    }
21621}
21622#[doc = "Odometry message to communicate odometry information with an external interface. Fits ROS REP 147 standard for aerial vehicles (<http://www.ros.org/reps/rep-0147.html>)."]
21623#[doc = ""]
21624#[doc = "ID: 331"]
21625#[derive(Debug, Clone, PartialEq)]
21626#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21627#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21628pub struct ODOMETRY_DATA {
21629    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
21630    pub time_usec: u64,
21631    #[doc = "X Position"]
21632    pub x: f32,
21633    #[doc = "Y Position"]
21634    pub y: f32,
21635    #[doc = "Z Position"]
21636    pub z: f32,
21637    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation)"]
21638    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21639    pub q: [f32; 4],
21640    #[doc = "X linear speed"]
21641    pub vx: f32,
21642    #[doc = "Y linear speed"]
21643    pub vy: f32,
21644    #[doc = "Z linear speed"]
21645    pub vz: f32,
21646    #[doc = "Roll angular speed"]
21647    pub rollspeed: f32,
21648    #[doc = "Pitch angular speed"]
21649    pub pitchspeed: f32,
21650    #[doc = "Yaw angular speed"]
21651    pub yawspeed: f32,
21652    #[doc = "Row-major representation of a 6x6 pose cross-covariance matrix upper right triangle (states: x, y, z, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
21653    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21654    pub pose_covariance: [f32; 21],
21655    #[doc = "Row-major representation of a 6x6 velocity cross-covariance matrix upper right triangle (states: vx, vy, vz, rollspeed, pitchspeed, yawspeed; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
21656    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21657    pub velocity_covariance: [f32; 21],
21658    #[doc = "Coordinate frame of reference for the pose data."]
21659    pub frame_id: MavFrame,
21660    #[doc = "Coordinate frame of reference for the velocity in free space (twist) data."]
21661    pub child_frame_id: MavFrame,
21662    #[doc = "Estimate reset counter. This should be incremented when the estimate resets in any of the dimensions (position, velocity, attitude, angular speed). This is designed to be used when e.g an external SLAM system detects a loop-closure and the estimate jumps."]
21663    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
21664    pub reset_counter: u8,
21665    #[doc = "Type of estimator that is providing the odometry."]
21666    #[cfg_attr(feature = "serde", serde(default))]
21667    pub estimator_type: MavEstimatorType,
21668    #[doc = "Optional odometry quality metric as a percentage. -1 = odometry has failed, 0 = unknown/unset quality, 1 = worst quality, 100 = best quality"]
21669    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
21670    pub quality: i8,
21671}
21672impl ODOMETRY_DATA {
21673    pub const ENCODED_LEN: usize = 233usize;
21674    pub const DEFAULT: Self = Self {
21675        time_usec: 0_u64,
21676        x: 0.0_f32,
21677        y: 0.0_f32,
21678        z: 0.0_f32,
21679        q: [0.0_f32; 4usize],
21680        vx: 0.0_f32,
21681        vy: 0.0_f32,
21682        vz: 0.0_f32,
21683        rollspeed: 0.0_f32,
21684        pitchspeed: 0.0_f32,
21685        yawspeed: 0.0_f32,
21686        pose_covariance: [0.0_f32; 21usize],
21687        velocity_covariance: [0.0_f32; 21usize],
21688        frame_id: MavFrame::DEFAULT,
21689        child_frame_id: MavFrame::DEFAULT,
21690        reset_counter: 0_u8,
21691        estimator_type: MavEstimatorType::DEFAULT,
21692        quality: 0_i8,
21693    };
21694    #[cfg(feature = "arbitrary")]
21695    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21696        use arbitrary::{Arbitrary, Unstructured};
21697        let mut buf = [0u8; 1024];
21698        rng.fill_bytes(&mut buf);
21699        let mut unstructured = Unstructured::new(&buf);
21700        Self::arbitrary(&mut unstructured).unwrap_or_default()
21701    }
21702}
21703impl Default for ODOMETRY_DATA {
21704    fn default() -> Self {
21705        Self::DEFAULT.clone()
21706    }
21707}
21708impl MessageData for ODOMETRY_DATA {
21709    type Message = MavMessage;
21710    const ID: u32 = 331u32;
21711    const NAME: &'static str = "ODOMETRY";
21712    const EXTRA_CRC: u8 = 91u8;
21713    const ENCODED_LEN: usize = 233usize;
21714    fn deser(
21715        _version: MavlinkVersion,
21716        __input: &[u8],
21717    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21718        let avail_len = __input.len();
21719        let mut payload_buf = [0; Self::ENCODED_LEN];
21720        let mut buf = if avail_len < Self::ENCODED_LEN {
21721            payload_buf[0..avail_len].copy_from_slice(__input);
21722            Bytes::new(&payload_buf)
21723        } else {
21724            Bytes::new(__input)
21725        };
21726        let mut __struct = Self::default();
21727        __struct.time_usec = buf.get_u64_le();
21728        __struct.x = buf.get_f32_le();
21729        __struct.y = buf.get_f32_le();
21730        __struct.z = buf.get_f32_le();
21731        for v in &mut __struct.q {
21732            let val = buf.get_f32_le();
21733            *v = val;
21734        }
21735        __struct.vx = buf.get_f32_le();
21736        __struct.vy = buf.get_f32_le();
21737        __struct.vz = buf.get_f32_le();
21738        __struct.rollspeed = buf.get_f32_le();
21739        __struct.pitchspeed = buf.get_f32_le();
21740        __struct.yawspeed = buf.get_f32_le();
21741        for v in &mut __struct.pose_covariance {
21742            let val = buf.get_f32_le();
21743            *v = val;
21744        }
21745        for v in &mut __struct.velocity_covariance {
21746            let val = buf.get_f32_le();
21747            *v = val;
21748        }
21749        let tmp = buf.get_u8();
21750        __struct.frame_id =
21751            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21752                enum_type: "MavFrame",
21753                value: tmp as u32,
21754            })?;
21755        let tmp = buf.get_u8();
21756        __struct.child_frame_id =
21757            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21758                enum_type: "MavFrame",
21759                value: tmp as u32,
21760            })?;
21761        __struct.reset_counter = buf.get_u8();
21762        let tmp = buf.get_u8();
21763        __struct.estimator_type =
21764            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21765                enum_type: "MavEstimatorType",
21766                value: tmp as u32,
21767            })?;
21768        __struct.quality = buf.get_i8();
21769        Ok(__struct)
21770    }
21771    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21772        let mut __tmp = BytesMut::new(bytes);
21773        #[allow(clippy::absurd_extreme_comparisons)]
21774        #[allow(unused_comparisons)]
21775        if __tmp.remaining() < Self::ENCODED_LEN {
21776            panic!(
21777                "buffer is too small (need {} bytes, but got {})",
21778                Self::ENCODED_LEN,
21779                __tmp.remaining(),
21780            )
21781        }
21782        __tmp.put_u64_le(self.time_usec);
21783        __tmp.put_f32_le(self.x);
21784        __tmp.put_f32_le(self.y);
21785        __tmp.put_f32_le(self.z);
21786        for val in &self.q {
21787            __tmp.put_f32_le(*val);
21788        }
21789        __tmp.put_f32_le(self.vx);
21790        __tmp.put_f32_le(self.vy);
21791        __tmp.put_f32_le(self.vz);
21792        __tmp.put_f32_le(self.rollspeed);
21793        __tmp.put_f32_le(self.pitchspeed);
21794        __tmp.put_f32_le(self.yawspeed);
21795        for val in &self.pose_covariance {
21796            __tmp.put_f32_le(*val);
21797        }
21798        for val in &self.velocity_covariance {
21799            __tmp.put_f32_le(*val);
21800        }
21801        __tmp.put_u8(self.frame_id as u8);
21802        __tmp.put_u8(self.child_frame_id as u8);
21803        if matches!(version, MavlinkVersion::V2) {
21804            __tmp.put_u8(self.reset_counter);
21805            __tmp.put_u8(self.estimator_type as u8);
21806            __tmp.put_i8(self.quality);
21807            let len = __tmp.len();
21808            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21809        } else {
21810            __tmp.len()
21811        }
21812    }
21813}
21814#[doc = "Hardware status sent by an onboard computer."]
21815#[doc = ""]
21816#[doc = "ID: 390"]
21817#[derive(Debug, Clone, PartialEq)]
21818#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21819#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21820pub struct ONBOARD_COMPUTER_STATUS_DATA {
21821    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
21822    pub time_usec: u64,
21823    #[doc = "Time since system boot."]
21824    pub uptime: u32,
21825    #[doc = "Amount of used RAM on the component system. A value of UINT32_MAX implies the field is unused."]
21826    pub ram_usage: u32,
21827    #[doc = "Total amount of RAM on the component system. A value of UINT32_MAX implies the field is unused."]
21828    pub ram_total: u32,
21829    #[doc = "Storage type: 0: HDD, 1: SSD, 2: EMMC, 3: SD card (non-removable), 4: SD card (removable). A value of UINT32_MAX implies the field is unused."]
21830    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21831    pub storage_type: [u32; 4],
21832    #[doc = "Amount of used storage space on the component system. A value of UINT32_MAX implies the field is unused."]
21833    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21834    pub storage_usage: [u32; 4],
21835    #[doc = "Total amount of storage space on the component system. A value of UINT32_MAX implies the field is unused."]
21836    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21837    pub storage_total: [u32; 4],
21838    #[doc = "Link type: 0-9: UART, 10-19: Wired network, 20-29: Wifi, 30-39: Point-to-point proprietary, 40-49: Mesh proprietary"]
21839    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21840    pub link_type: [u32; 6],
21841    #[doc = "Network traffic from the component system. A value of UINT32_MAX implies the field is unused."]
21842    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21843    pub link_tx_rate: [u32; 6],
21844    #[doc = "Network traffic to the component system. A value of UINT32_MAX implies the field is unused."]
21845    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21846    pub link_rx_rate: [u32; 6],
21847    #[doc = "Network capacity from the component system. A value of UINT32_MAX implies the field is unused."]
21848    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21849    pub link_tx_max: [u32; 6],
21850    #[doc = "Network capacity to the component system. A value of UINT32_MAX implies the field is unused."]
21851    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21852    pub link_rx_max: [u32; 6],
21853    #[doc = "Fan speeds. A value of INT16_MAX implies the field is unused."]
21854    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21855    pub fan_speed: [i16; 4],
21856    #[doc = "Type of the onboard computer: 0: Mission computer primary, 1: Mission computer backup 1, 2: Mission computer backup 2, 3: Compute node, 4-5: Compute spares, 6-9: Payload computers."]
21857    pub mavtype: u8,
21858    #[doc = "CPU usage on the component in percent (100 - idle). A value of UINT8_MAX implies the field is unused."]
21859    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21860    pub cpu_cores: [u8; 8],
21861    #[doc = "Combined CPU usage as the last 10 slices of 100 MS (a histogram). This allows to identify spikes in load that max out the system, but only for a short amount of time. A value of UINT8_MAX implies the field is unused."]
21862    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21863    pub cpu_combined: [u8; 10],
21864    #[doc = "GPU usage on the component in percent (100 - idle). A value of UINT8_MAX implies the field is unused."]
21865    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21866    pub gpu_cores: [u8; 4],
21867    #[doc = "Combined GPU usage as the last 10 slices of 100 MS (a histogram). This allows to identify spikes in load that max out the system, but only for a short amount of time. A value of UINT8_MAX implies the field is unused."]
21868    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21869    pub gpu_combined: [u8; 10],
21870    #[doc = "Temperature of the board. A value of INT8_MAX implies the field is unused."]
21871    pub temperature_board: i8,
21872    #[doc = "Temperature of the CPU core. A value of INT8_MAX implies the field is unused."]
21873    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21874    pub temperature_core: [i8; 8],
21875}
21876impl ONBOARD_COMPUTER_STATUS_DATA {
21877    pub const ENCODED_LEN: usize = 238usize;
21878    pub const DEFAULT: Self = Self {
21879        time_usec: 0_u64,
21880        uptime: 0_u32,
21881        ram_usage: 0_u32,
21882        ram_total: 0_u32,
21883        storage_type: [0_u32; 4usize],
21884        storage_usage: [0_u32; 4usize],
21885        storage_total: [0_u32; 4usize],
21886        link_type: [0_u32; 6usize],
21887        link_tx_rate: [0_u32; 6usize],
21888        link_rx_rate: [0_u32; 6usize],
21889        link_tx_max: [0_u32; 6usize],
21890        link_rx_max: [0_u32; 6usize],
21891        fan_speed: [0_i16; 4usize],
21892        mavtype: 0_u8,
21893        cpu_cores: [0_u8; 8usize],
21894        cpu_combined: [0_u8; 10usize],
21895        gpu_cores: [0_u8; 4usize],
21896        gpu_combined: [0_u8; 10usize],
21897        temperature_board: 0_i8,
21898        temperature_core: [0_i8; 8usize],
21899    };
21900    #[cfg(feature = "arbitrary")]
21901    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21902        use arbitrary::{Arbitrary, Unstructured};
21903        let mut buf = [0u8; 1024];
21904        rng.fill_bytes(&mut buf);
21905        let mut unstructured = Unstructured::new(&buf);
21906        Self::arbitrary(&mut unstructured).unwrap_or_default()
21907    }
21908}
21909impl Default for ONBOARD_COMPUTER_STATUS_DATA {
21910    fn default() -> Self {
21911        Self::DEFAULT.clone()
21912    }
21913}
21914impl MessageData for ONBOARD_COMPUTER_STATUS_DATA {
21915    type Message = MavMessage;
21916    const ID: u32 = 390u32;
21917    const NAME: &'static str = "ONBOARD_COMPUTER_STATUS";
21918    const EXTRA_CRC: u8 = 156u8;
21919    const ENCODED_LEN: usize = 238usize;
21920    fn deser(
21921        _version: MavlinkVersion,
21922        __input: &[u8],
21923    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21924        let avail_len = __input.len();
21925        let mut payload_buf = [0; Self::ENCODED_LEN];
21926        let mut buf = if avail_len < Self::ENCODED_LEN {
21927            payload_buf[0..avail_len].copy_from_slice(__input);
21928            Bytes::new(&payload_buf)
21929        } else {
21930            Bytes::new(__input)
21931        };
21932        let mut __struct = Self::default();
21933        __struct.time_usec = buf.get_u64_le();
21934        __struct.uptime = buf.get_u32_le();
21935        __struct.ram_usage = buf.get_u32_le();
21936        __struct.ram_total = buf.get_u32_le();
21937        for v in &mut __struct.storage_type {
21938            let val = buf.get_u32_le();
21939            *v = val;
21940        }
21941        for v in &mut __struct.storage_usage {
21942            let val = buf.get_u32_le();
21943            *v = val;
21944        }
21945        for v in &mut __struct.storage_total {
21946            let val = buf.get_u32_le();
21947            *v = val;
21948        }
21949        for v in &mut __struct.link_type {
21950            let val = buf.get_u32_le();
21951            *v = val;
21952        }
21953        for v in &mut __struct.link_tx_rate {
21954            let val = buf.get_u32_le();
21955            *v = val;
21956        }
21957        for v in &mut __struct.link_rx_rate {
21958            let val = buf.get_u32_le();
21959            *v = val;
21960        }
21961        for v in &mut __struct.link_tx_max {
21962            let val = buf.get_u32_le();
21963            *v = val;
21964        }
21965        for v in &mut __struct.link_rx_max {
21966            let val = buf.get_u32_le();
21967            *v = val;
21968        }
21969        for v in &mut __struct.fan_speed {
21970            let val = buf.get_i16_le();
21971            *v = val;
21972        }
21973        __struct.mavtype = buf.get_u8();
21974        for v in &mut __struct.cpu_cores {
21975            let val = buf.get_u8();
21976            *v = val;
21977        }
21978        for v in &mut __struct.cpu_combined {
21979            let val = buf.get_u8();
21980            *v = val;
21981        }
21982        for v in &mut __struct.gpu_cores {
21983            let val = buf.get_u8();
21984            *v = val;
21985        }
21986        for v in &mut __struct.gpu_combined {
21987            let val = buf.get_u8();
21988            *v = val;
21989        }
21990        __struct.temperature_board = buf.get_i8();
21991        for v in &mut __struct.temperature_core {
21992            let val = buf.get_i8();
21993            *v = val;
21994        }
21995        Ok(__struct)
21996    }
21997    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21998        let mut __tmp = BytesMut::new(bytes);
21999        #[allow(clippy::absurd_extreme_comparisons)]
22000        #[allow(unused_comparisons)]
22001        if __tmp.remaining() < Self::ENCODED_LEN {
22002            panic!(
22003                "buffer is too small (need {} bytes, but got {})",
22004                Self::ENCODED_LEN,
22005                __tmp.remaining(),
22006            )
22007        }
22008        __tmp.put_u64_le(self.time_usec);
22009        __tmp.put_u32_le(self.uptime);
22010        __tmp.put_u32_le(self.ram_usage);
22011        __tmp.put_u32_le(self.ram_total);
22012        for val in &self.storage_type {
22013            __tmp.put_u32_le(*val);
22014        }
22015        for val in &self.storage_usage {
22016            __tmp.put_u32_le(*val);
22017        }
22018        for val in &self.storage_total {
22019            __tmp.put_u32_le(*val);
22020        }
22021        for val in &self.link_type {
22022            __tmp.put_u32_le(*val);
22023        }
22024        for val in &self.link_tx_rate {
22025            __tmp.put_u32_le(*val);
22026        }
22027        for val in &self.link_rx_rate {
22028            __tmp.put_u32_le(*val);
22029        }
22030        for val in &self.link_tx_max {
22031            __tmp.put_u32_le(*val);
22032        }
22033        for val in &self.link_rx_max {
22034            __tmp.put_u32_le(*val);
22035        }
22036        for val in &self.fan_speed {
22037            __tmp.put_i16_le(*val);
22038        }
22039        __tmp.put_u8(self.mavtype);
22040        for val in &self.cpu_cores {
22041            __tmp.put_u8(*val);
22042        }
22043        for val in &self.cpu_combined {
22044            __tmp.put_u8(*val);
22045        }
22046        for val in &self.gpu_cores {
22047            __tmp.put_u8(*val);
22048        }
22049        for val in &self.gpu_combined {
22050            __tmp.put_u8(*val);
22051        }
22052        __tmp.put_i8(self.temperature_board);
22053        for val in &self.temperature_core {
22054            __tmp.put_i8(*val);
22055        }
22056        if matches!(version, MavlinkVersion::V2) {
22057            let len = __tmp.len();
22058            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22059        } else {
22060            __tmp.len()
22061        }
22062    }
22063}
22064#[doc = "Transmitter (remote ID system) is enabled and ready to start sending location and other required information. This is streamed by transmitter. A flight controller uses it as a condition to arm."]
22065#[doc = ""]
22066#[doc = "ID: 12918"]
22067#[derive(Debug, Clone, PartialEq)]
22068#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22069#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22070pub struct OPEN_DRONE_ID_ARM_STATUS_DATA {
22071    #[doc = "Status level indicating if arming is allowed."]
22072    pub status: MavOdidArmStatus,
22073    #[doc = "Text error message, should be empty if status is good to arm. Fill with nulls in unused portion."]
22074    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22075    pub error: [u8; 50],
22076}
22077impl OPEN_DRONE_ID_ARM_STATUS_DATA {
22078    pub const ENCODED_LEN: usize = 51usize;
22079    pub const DEFAULT: Self = Self {
22080        status: MavOdidArmStatus::DEFAULT,
22081        error: [0_u8; 50usize],
22082    };
22083    #[cfg(feature = "arbitrary")]
22084    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22085        use arbitrary::{Arbitrary, Unstructured};
22086        let mut buf = [0u8; 1024];
22087        rng.fill_bytes(&mut buf);
22088        let mut unstructured = Unstructured::new(&buf);
22089        Self::arbitrary(&mut unstructured).unwrap_or_default()
22090    }
22091}
22092impl Default for OPEN_DRONE_ID_ARM_STATUS_DATA {
22093    fn default() -> Self {
22094        Self::DEFAULT.clone()
22095    }
22096}
22097impl MessageData for OPEN_DRONE_ID_ARM_STATUS_DATA {
22098    type Message = MavMessage;
22099    const ID: u32 = 12918u32;
22100    const NAME: &'static str = "OPEN_DRONE_ID_ARM_STATUS";
22101    const EXTRA_CRC: u8 = 139u8;
22102    const ENCODED_LEN: usize = 51usize;
22103    fn deser(
22104        _version: MavlinkVersion,
22105        __input: &[u8],
22106    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22107        let avail_len = __input.len();
22108        let mut payload_buf = [0; Self::ENCODED_LEN];
22109        let mut buf = if avail_len < Self::ENCODED_LEN {
22110            payload_buf[0..avail_len].copy_from_slice(__input);
22111            Bytes::new(&payload_buf)
22112        } else {
22113            Bytes::new(__input)
22114        };
22115        let mut __struct = Self::default();
22116        let tmp = buf.get_u8();
22117        __struct.status =
22118            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22119                enum_type: "MavOdidArmStatus",
22120                value: tmp as u32,
22121            })?;
22122        for v in &mut __struct.error {
22123            let val = buf.get_u8();
22124            *v = val;
22125        }
22126        Ok(__struct)
22127    }
22128    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22129        let mut __tmp = BytesMut::new(bytes);
22130        #[allow(clippy::absurd_extreme_comparisons)]
22131        #[allow(unused_comparisons)]
22132        if __tmp.remaining() < Self::ENCODED_LEN {
22133            panic!(
22134                "buffer is too small (need {} bytes, but got {})",
22135                Self::ENCODED_LEN,
22136                __tmp.remaining(),
22137            )
22138        }
22139        __tmp.put_u8(self.status as u8);
22140        for val in &self.error {
22141            __tmp.put_u8(*val);
22142        }
22143        if matches!(version, MavlinkVersion::V2) {
22144            let len = __tmp.len();
22145            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22146        } else {
22147            __tmp.len()
22148        }
22149    }
22150}
22151#[doc = "Data for filling the OpenDroneID Authentication message. The Authentication Message defines a field that can provide a means of authenticity for the identity of the UAS (Unmanned Aircraft System). The Authentication message can have two different formats. For data page 0, the fields PageCount, Length and TimeStamp are present and AuthData is only 17 bytes. For data page 1 through 15, PageCount, Length and TimeStamp are not present and the size of AuthData is 23 bytes."]
22152#[doc = ""]
22153#[doc = "ID: 12902"]
22154#[derive(Debug, Clone, PartialEq)]
22155#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22156#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22157pub struct OPEN_DRONE_ID_AUTHENTICATION_DATA {
22158    #[doc = "This field is only present for page 0. 32 bit Unix Timestamp in seconds since 00:00:00 01/01/2019."]
22159    pub timestamp: u32,
22160    #[doc = "System ID (0 for broadcast)."]
22161    pub target_system: u8,
22162    #[doc = "Component ID (0 for broadcast)."]
22163    pub target_component: u8,
22164    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
22165    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22166    pub id_or_mac: [u8; 20],
22167    #[doc = "Indicates the type of authentication."]
22168    pub authentication_type: MavOdidAuthType,
22169    #[doc = "Allowed range is 0 - 15."]
22170    pub data_page: u8,
22171    #[doc = "This field is only present for page 0. Allowed range is 0 - 15. See the description of struct ODID_Auth_data at <https://github.com/opendroneid/opendroneid-core-c/blob/master/libopendroneid/opendroneid.h>."]
22172    pub last_page_index: u8,
22173    #[doc = "This field is only present for page 0. Total bytes of authentication_data from all data pages. See the description of struct ODID_Auth_data at <https://github.com/opendroneid/opendroneid-core-c/blob/master/libopendroneid/opendroneid.h>."]
22174    pub length: u8,
22175    #[doc = "Opaque authentication data. For page 0, the size is only 17 bytes. For other pages, the size is 23 bytes. Shall be filled with nulls in the unused portion of the field."]
22176    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22177    pub authentication_data: [u8; 23],
22178}
22179impl OPEN_DRONE_ID_AUTHENTICATION_DATA {
22180    pub const ENCODED_LEN: usize = 53usize;
22181    pub const DEFAULT: Self = Self {
22182        timestamp: 0_u32,
22183        target_system: 0_u8,
22184        target_component: 0_u8,
22185        id_or_mac: [0_u8; 20usize],
22186        authentication_type: MavOdidAuthType::DEFAULT,
22187        data_page: 0_u8,
22188        last_page_index: 0_u8,
22189        length: 0_u8,
22190        authentication_data: [0_u8; 23usize],
22191    };
22192    #[cfg(feature = "arbitrary")]
22193    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22194        use arbitrary::{Arbitrary, Unstructured};
22195        let mut buf = [0u8; 1024];
22196        rng.fill_bytes(&mut buf);
22197        let mut unstructured = Unstructured::new(&buf);
22198        Self::arbitrary(&mut unstructured).unwrap_or_default()
22199    }
22200}
22201impl Default for OPEN_DRONE_ID_AUTHENTICATION_DATA {
22202    fn default() -> Self {
22203        Self::DEFAULT.clone()
22204    }
22205}
22206impl MessageData for OPEN_DRONE_ID_AUTHENTICATION_DATA {
22207    type Message = MavMessage;
22208    const ID: u32 = 12902u32;
22209    const NAME: &'static str = "OPEN_DRONE_ID_AUTHENTICATION";
22210    const EXTRA_CRC: u8 = 140u8;
22211    const ENCODED_LEN: usize = 53usize;
22212    fn deser(
22213        _version: MavlinkVersion,
22214        __input: &[u8],
22215    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22216        let avail_len = __input.len();
22217        let mut payload_buf = [0; Self::ENCODED_LEN];
22218        let mut buf = if avail_len < Self::ENCODED_LEN {
22219            payload_buf[0..avail_len].copy_from_slice(__input);
22220            Bytes::new(&payload_buf)
22221        } else {
22222            Bytes::new(__input)
22223        };
22224        let mut __struct = Self::default();
22225        __struct.timestamp = buf.get_u32_le();
22226        __struct.target_system = buf.get_u8();
22227        __struct.target_component = buf.get_u8();
22228        for v in &mut __struct.id_or_mac {
22229            let val = buf.get_u8();
22230            *v = val;
22231        }
22232        let tmp = buf.get_u8();
22233        __struct.authentication_type =
22234            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22235                enum_type: "MavOdidAuthType",
22236                value: tmp as u32,
22237            })?;
22238        __struct.data_page = buf.get_u8();
22239        __struct.last_page_index = buf.get_u8();
22240        __struct.length = buf.get_u8();
22241        for v in &mut __struct.authentication_data {
22242            let val = buf.get_u8();
22243            *v = val;
22244        }
22245        Ok(__struct)
22246    }
22247    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22248        let mut __tmp = BytesMut::new(bytes);
22249        #[allow(clippy::absurd_extreme_comparisons)]
22250        #[allow(unused_comparisons)]
22251        if __tmp.remaining() < Self::ENCODED_LEN {
22252            panic!(
22253                "buffer is too small (need {} bytes, but got {})",
22254                Self::ENCODED_LEN,
22255                __tmp.remaining(),
22256            )
22257        }
22258        __tmp.put_u32_le(self.timestamp);
22259        __tmp.put_u8(self.target_system);
22260        __tmp.put_u8(self.target_component);
22261        for val in &self.id_or_mac {
22262            __tmp.put_u8(*val);
22263        }
22264        __tmp.put_u8(self.authentication_type as u8);
22265        __tmp.put_u8(self.data_page);
22266        __tmp.put_u8(self.last_page_index);
22267        __tmp.put_u8(self.length);
22268        for val in &self.authentication_data {
22269            __tmp.put_u8(*val);
22270        }
22271        if matches!(version, MavlinkVersion::V2) {
22272            let len = __tmp.len();
22273            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22274        } else {
22275            __tmp.len()
22276        }
22277    }
22278}
22279#[doc = "Data for filling the OpenDroneID Basic ID message. This and the below messages are primarily meant for feeding data to/from an OpenDroneID implementation. E.g. <https://github.com/opendroneid/opendroneid-core-c>. These messages are compatible with the ASTM F3411 Remote ID standard and the ASD-STAN prEN 4709-002 Direct Remote ID standard. Additional information and usage of these messages is documented at <https://mavlink.io/en/services/opendroneid.html>."]
22280#[doc = ""]
22281#[doc = "ID: 12900"]
22282#[derive(Debug, Clone, PartialEq)]
22283#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22284#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22285pub struct OPEN_DRONE_ID_BASIC_ID_DATA {
22286    #[doc = "System ID (0 for broadcast)."]
22287    pub target_system: u8,
22288    #[doc = "Component ID (0 for broadcast)."]
22289    pub target_component: u8,
22290    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
22291    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22292    pub id_or_mac: [u8; 20],
22293    #[doc = "Indicates the format for the uas_id field of this message."]
22294    pub id_type: MavOdidIdType,
22295    #[doc = "Indicates the type of UA (Unmanned Aircraft)."]
22296    pub ua_type: MavOdidUaType,
22297    #[doc = "UAS (Unmanned Aircraft System) ID following the format specified by id_type. Shall be filled with nulls in the unused portion of the field."]
22298    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22299    pub uas_id: [u8; 20],
22300}
22301impl OPEN_DRONE_ID_BASIC_ID_DATA {
22302    pub const ENCODED_LEN: usize = 44usize;
22303    pub const DEFAULT: Self = Self {
22304        target_system: 0_u8,
22305        target_component: 0_u8,
22306        id_or_mac: [0_u8; 20usize],
22307        id_type: MavOdidIdType::DEFAULT,
22308        ua_type: MavOdidUaType::DEFAULT,
22309        uas_id: [0_u8; 20usize],
22310    };
22311    #[cfg(feature = "arbitrary")]
22312    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22313        use arbitrary::{Arbitrary, Unstructured};
22314        let mut buf = [0u8; 1024];
22315        rng.fill_bytes(&mut buf);
22316        let mut unstructured = Unstructured::new(&buf);
22317        Self::arbitrary(&mut unstructured).unwrap_or_default()
22318    }
22319}
22320impl Default for OPEN_DRONE_ID_BASIC_ID_DATA {
22321    fn default() -> Self {
22322        Self::DEFAULT.clone()
22323    }
22324}
22325impl MessageData for OPEN_DRONE_ID_BASIC_ID_DATA {
22326    type Message = MavMessage;
22327    const ID: u32 = 12900u32;
22328    const NAME: &'static str = "OPEN_DRONE_ID_BASIC_ID";
22329    const EXTRA_CRC: u8 = 114u8;
22330    const ENCODED_LEN: usize = 44usize;
22331    fn deser(
22332        _version: MavlinkVersion,
22333        __input: &[u8],
22334    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22335        let avail_len = __input.len();
22336        let mut payload_buf = [0; Self::ENCODED_LEN];
22337        let mut buf = if avail_len < Self::ENCODED_LEN {
22338            payload_buf[0..avail_len].copy_from_slice(__input);
22339            Bytes::new(&payload_buf)
22340        } else {
22341            Bytes::new(__input)
22342        };
22343        let mut __struct = Self::default();
22344        __struct.target_system = buf.get_u8();
22345        __struct.target_component = buf.get_u8();
22346        for v in &mut __struct.id_or_mac {
22347            let val = buf.get_u8();
22348            *v = val;
22349        }
22350        let tmp = buf.get_u8();
22351        __struct.id_type =
22352            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22353                enum_type: "MavOdidIdType",
22354                value: tmp as u32,
22355            })?;
22356        let tmp = buf.get_u8();
22357        __struct.ua_type =
22358            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22359                enum_type: "MavOdidUaType",
22360                value: tmp as u32,
22361            })?;
22362        for v in &mut __struct.uas_id {
22363            let val = buf.get_u8();
22364            *v = val;
22365        }
22366        Ok(__struct)
22367    }
22368    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22369        let mut __tmp = BytesMut::new(bytes);
22370        #[allow(clippy::absurd_extreme_comparisons)]
22371        #[allow(unused_comparisons)]
22372        if __tmp.remaining() < Self::ENCODED_LEN {
22373            panic!(
22374                "buffer is too small (need {} bytes, but got {})",
22375                Self::ENCODED_LEN,
22376                __tmp.remaining(),
22377            )
22378        }
22379        __tmp.put_u8(self.target_system);
22380        __tmp.put_u8(self.target_component);
22381        for val in &self.id_or_mac {
22382            __tmp.put_u8(*val);
22383        }
22384        __tmp.put_u8(self.id_type as u8);
22385        __tmp.put_u8(self.ua_type as u8);
22386        for val in &self.uas_id {
22387            __tmp.put_u8(*val);
22388        }
22389        if matches!(version, MavlinkVersion::V2) {
22390            let len = __tmp.len();
22391            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22392        } else {
22393            __tmp.len()
22394        }
22395    }
22396}
22397#[doc = "Data for filling the OpenDroneID Location message. The float data types are 32-bit IEEE 754. The Location message provides the location, altitude, direction and speed of the aircraft."]
22398#[doc = ""]
22399#[doc = "ID: 12901"]
22400#[derive(Debug, Clone, PartialEq)]
22401#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22402#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22403pub struct OPEN_DRONE_ID_LOCATION_DATA {
22404    #[doc = "Current latitude of the unmanned aircraft. If unknown: 0 (both Lat/Lon)."]
22405    pub latitude: i32,
22406    #[doc = "Current longitude of the unmanned aircraft. If unknown: 0 (both Lat/Lon)."]
22407    pub longitude: i32,
22408    #[doc = "The altitude calculated from the barometric pressue. Reference is against 29.92inHg or 1013.2mb. If unknown: -1000 m."]
22409    pub altitude_barometric: f32,
22410    #[doc = "The geodetic altitude as defined by WGS84. If unknown: -1000 m."]
22411    pub altitude_geodetic: f32,
22412    #[doc = "The current height of the unmanned aircraft above the take-off location or the ground as indicated by height_reference. If unknown: -1000 m."]
22413    pub height: f32,
22414    #[doc = "Seconds after the full hour with reference to UTC time. Typically the GPS outputs a time-of-week value in milliseconds. First convert that to UTC and then convert for this field using ((float) (time_week_ms % (60*60*1000))) / 1000. If unknown: 0xFFFF."]
22415    pub timestamp: f32,
22416    #[doc = "Direction over ground (not heading, but direction of movement) measured clockwise from true North: 0 - 35999 centi-degrees. If unknown: 36100 centi-degrees."]
22417    pub direction: u16,
22418    #[doc = "Ground speed. Positive only. If unknown: 25500 cm/s. If speed is larger than 25425 cm/s, use 25425 cm/s."]
22419    pub speed_horizontal: u16,
22420    #[doc = "The vertical speed. Up is positive. If unknown: 6300 cm/s. If speed is larger than 6200 cm/s, use 6200 cm/s. If lower than -6200 cm/s, use -6200 cm/s."]
22421    pub speed_vertical: i16,
22422    #[doc = "System ID (0 for broadcast)."]
22423    pub target_system: u8,
22424    #[doc = "Component ID (0 for broadcast)."]
22425    pub target_component: u8,
22426    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
22427    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22428    pub id_or_mac: [u8; 20],
22429    #[doc = "Indicates whether the unmanned aircraft is on the ground or in the air."]
22430    pub status: MavOdidStatus,
22431    #[doc = "Indicates the reference point for the height field."]
22432    pub height_reference: MavOdidHeightRef,
22433    #[doc = "The accuracy of the horizontal position."]
22434    pub horizontal_accuracy: MavOdidHorAcc,
22435    #[doc = "The accuracy of the vertical position."]
22436    pub vertical_accuracy: MavOdidVerAcc,
22437    #[doc = "The accuracy of the barometric altitude."]
22438    pub barometer_accuracy: MavOdidVerAcc,
22439    #[doc = "The accuracy of the horizontal and vertical speed."]
22440    pub speed_accuracy: MavOdidSpeedAcc,
22441    #[doc = "The accuracy of the timestamps."]
22442    pub timestamp_accuracy: MavOdidTimeAcc,
22443}
22444impl OPEN_DRONE_ID_LOCATION_DATA {
22445    pub const ENCODED_LEN: usize = 59usize;
22446    pub const DEFAULT: Self = Self {
22447        latitude: 0_i32,
22448        longitude: 0_i32,
22449        altitude_barometric: 0.0_f32,
22450        altitude_geodetic: 0.0_f32,
22451        height: 0.0_f32,
22452        timestamp: 0.0_f32,
22453        direction: 0_u16,
22454        speed_horizontal: 0_u16,
22455        speed_vertical: 0_i16,
22456        target_system: 0_u8,
22457        target_component: 0_u8,
22458        id_or_mac: [0_u8; 20usize],
22459        status: MavOdidStatus::DEFAULT,
22460        height_reference: MavOdidHeightRef::DEFAULT,
22461        horizontal_accuracy: MavOdidHorAcc::DEFAULT,
22462        vertical_accuracy: MavOdidVerAcc::DEFAULT,
22463        barometer_accuracy: MavOdidVerAcc::DEFAULT,
22464        speed_accuracy: MavOdidSpeedAcc::DEFAULT,
22465        timestamp_accuracy: MavOdidTimeAcc::DEFAULT,
22466    };
22467    #[cfg(feature = "arbitrary")]
22468    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22469        use arbitrary::{Arbitrary, Unstructured};
22470        let mut buf = [0u8; 1024];
22471        rng.fill_bytes(&mut buf);
22472        let mut unstructured = Unstructured::new(&buf);
22473        Self::arbitrary(&mut unstructured).unwrap_or_default()
22474    }
22475}
22476impl Default for OPEN_DRONE_ID_LOCATION_DATA {
22477    fn default() -> Self {
22478        Self::DEFAULT.clone()
22479    }
22480}
22481impl MessageData for OPEN_DRONE_ID_LOCATION_DATA {
22482    type Message = MavMessage;
22483    const ID: u32 = 12901u32;
22484    const NAME: &'static str = "OPEN_DRONE_ID_LOCATION";
22485    const EXTRA_CRC: u8 = 254u8;
22486    const ENCODED_LEN: usize = 59usize;
22487    fn deser(
22488        _version: MavlinkVersion,
22489        __input: &[u8],
22490    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22491        let avail_len = __input.len();
22492        let mut payload_buf = [0; Self::ENCODED_LEN];
22493        let mut buf = if avail_len < Self::ENCODED_LEN {
22494            payload_buf[0..avail_len].copy_from_slice(__input);
22495            Bytes::new(&payload_buf)
22496        } else {
22497            Bytes::new(__input)
22498        };
22499        let mut __struct = Self::default();
22500        __struct.latitude = buf.get_i32_le();
22501        __struct.longitude = buf.get_i32_le();
22502        __struct.altitude_barometric = buf.get_f32_le();
22503        __struct.altitude_geodetic = buf.get_f32_le();
22504        __struct.height = buf.get_f32_le();
22505        __struct.timestamp = buf.get_f32_le();
22506        __struct.direction = buf.get_u16_le();
22507        __struct.speed_horizontal = buf.get_u16_le();
22508        __struct.speed_vertical = buf.get_i16_le();
22509        __struct.target_system = buf.get_u8();
22510        __struct.target_component = buf.get_u8();
22511        for v in &mut __struct.id_or_mac {
22512            let val = buf.get_u8();
22513            *v = val;
22514        }
22515        let tmp = buf.get_u8();
22516        __struct.status =
22517            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22518                enum_type: "MavOdidStatus",
22519                value: tmp as u32,
22520            })?;
22521        let tmp = buf.get_u8();
22522        __struct.height_reference =
22523            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22524                enum_type: "MavOdidHeightRef",
22525                value: tmp as u32,
22526            })?;
22527        let tmp = buf.get_u8();
22528        __struct.horizontal_accuracy =
22529            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22530                enum_type: "MavOdidHorAcc",
22531                value: tmp as u32,
22532            })?;
22533        let tmp = buf.get_u8();
22534        __struct.vertical_accuracy =
22535            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22536                enum_type: "MavOdidVerAcc",
22537                value: tmp as u32,
22538            })?;
22539        let tmp = buf.get_u8();
22540        __struct.barometer_accuracy =
22541            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22542                enum_type: "MavOdidVerAcc",
22543                value: tmp as u32,
22544            })?;
22545        let tmp = buf.get_u8();
22546        __struct.speed_accuracy =
22547            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22548                enum_type: "MavOdidSpeedAcc",
22549                value: tmp as u32,
22550            })?;
22551        let tmp = buf.get_u8();
22552        __struct.timestamp_accuracy =
22553            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22554                enum_type: "MavOdidTimeAcc",
22555                value: tmp as u32,
22556            })?;
22557        Ok(__struct)
22558    }
22559    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22560        let mut __tmp = BytesMut::new(bytes);
22561        #[allow(clippy::absurd_extreme_comparisons)]
22562        #[allow(unused_comparisons)]
22563        if __tmp.remaining() < Self::ENCODED_LEN {
22564            panic!(
22565                "buffer is too small (need {} bytes, but got {})",
22566                Self::ENCODED_LEN,
22567                __tmp.remaining(),
22568            )
22569        }
22570        __tmp.put_i32_le(self.latitude);
22571        __tmp.put_i32_le(self.longitude);
22572        __tmp.put_f32_le(self.altitude_barometric);
22573        __tmp.put_f32_le(self.altitude_geodetic);
22574        __tmp.put_f32_le(self.height);
22575        __tmp.put_f32_le(self.timestamp);
22576        __tmp.put_u16_le(self.direction);
22577        __tmp.put_u16_le(self.speed_horizontal);
22578        __tmp.put_i16_le(self.speed_vertical);
22579        __tmp.put_u8(self.target_system);
22580        __tmp.put_u8(self.target_component);
22581        for val in &self.id_or_mac {
22582            __tmp.put_u8(*val);
22583        }
22584        __tmp.put_u8(self.status as u8);
22585        __tmp.put_u8(self.height_reference as u8);
22586        __tmp.put_u8(self.horizontal_accuracy as u8);
22587        __tmp.put_u8(self.vertical_accuracy as u8);
22588        __tmp.put_u8(self.barometer_accuracy as u8);
22589        __tmp.put_u8(self.speed_accuracy as u8);
22590        __tmp.put_u8(self.timestamp_accuracy as u8);
22591        if matches!(version, MavlinkVersion::V2) {
22592            let len = __tmp.len();
22593            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22594        } else {
22595            __tmp.len()
22596        }
22597    }
22598}
22599#[doc = "An OpenDroneID message pack is a container for multiple encoded OpenDroneID messages (i.e. not in the format given for the above message descriptions but after encoding into the compressed OpenDroneID byte format). Used e.g. when transmitting on Bluetooth 5.0 Long Range/Extended Advertising or on WiFi Neighbor Aware Networking or on WiFi Beacon."]
22600#[doc = ""]
22601#[doc = "ID: 12915"]
22602#[derive(Debug, Clone, PartialEq)]
22603#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22604#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22605pub struct OPEN_DRONE_ID_MESSAGE_PACK_DATA {
22606    #[doc = "System ID (0 for broadcast)."]
22607    pub target_system: u8,
22608    #[doc = "Component ID (0 for broadcast)."]
22609    pub target_component: u8,
22610    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
22611    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22612    pub id_or_mac: [u8; 20],
22613    #[doc = "This field must currently always be equal to 25 (bytes), since all encoded OpenDroneID messages are specified to have this length."]
22614    pub single_message_size: u8,
22615    #[doc = "Number of encoded messages in the pack (not the number of bytes). Allowed range is 1 - 9."]
22616    pub msg_pack_size: u8,
22617    #[doc = "Concatenation of encoded OpenDroneID messages. Shall be filled with nulls in the unused portion of the field."]
22618    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22619    pub messages: [u8; 225],
22620}
22621impl OPEN_DRONE_ID_MESSAGE_PACK_DATA {
22622    pub const ENCODED_LEN: usize = 249usize;
22623    pub const DEFAULT: Self = Self {
22624        target_system: 0_u8,
22625        target_component: 0_u8,
22626        id_or_mac: [0_u8; 20usize],
22627        single_message_size: 0_u8,
22628        msg_pack_size: 0_u8,
22629        messages: [0_u8; 225usize],
22630    };
22631    #[cfg(feature = "arbitrary")]
22632    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22633        use arbitrary::{Arbitrary, Unstructured};
22634        let mut buf = [0u8; 1024];
22635        rng.fill_bytes(&mut buf);
22636        let mut unstructured = Unstructured::new(&buf);
22637        Self::arbitrary(&mut unstructured).unwrap_or_default()
22638    }
22639}
22640impl Default for OPEN_DRONE_ID_MESSAGE_PACK_DATA {
22641    fn default() -> Self {
22642        Self::DEFAULT.clone()
22643    }
22644}
22645impl MessageData for OPEN_DRONE_ID_MESSAGE_PACK_DATA {
22646    type Message = MavMessage;
22647    const ID: u32 = 12915u32;
22648    const NAME: &'static str = "OPEN_DRONE_ID_MESSAGE_PACK";
22649    const EXTRA_CRC: u8 = 94u8;
22650    const ENCODED_LEN: usize = 249usize;
22651    fn deser(
22652        _version: MavlinkVersion,
22653        __input: &[u8],
22654    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22655        let avail_len = __input.len();
22656        let mut payload_buf = [0; Self::ENCODED_LEN];
22657        let mut buf = if avail_len < Self::ENCODED_LEN {
22658            payload_buf[0..avail_len].copy_from_slice(__input);
22659            Bytes::new(&payload_buf)
22660        } else {
22661            Bytes::new(__input)
22662        };
22663        let mut __struct = Self::default();
22664        __struct.target_system = buf.get_u8();
22665        __struct.target_component = buf.get_u8();
22666        for v in &mut __struct.id_or_mac {
22667            let val = buf.get_u8();
22668            *v = val;
22669        }
22670        __struct.single_message_size = buf.get_u8();
22671        __struct.msg_pack_size = buf.get_u8();
22672        for v in &mut __struct.messages {
22673            let val = buf.get_u8();
22674            *v = val;
22675        }
22676        Ok(__struct)
22677    }
22678    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22679        let mut __tmp = BytesMut::new(bytes);
22680        #[allow(clippy::absurd_extreme_comparisons)]
22681        #[allow(unused_comparisons)]
22682        if __tmp.remaining() < Self::ENCODED_LEN {
22683            panic!(
22684                "buffer is too small (need {} bytes, but got {})",
22685                Self::ENCODED_LEN,
22686                __tmp.remaining(),
22687            )
22688        }
22689        __tmp.put_u8(self.target_system);
22690        __tmp.put_u8(self.target_component);
22691        for val in &self.id_or_mac {
22692            __tmp.put_u8(*val);
22693        }
22694        __tmp.put_u8(self.single_message_size);
22695        __tmp.put_u8(self.msg_pack_size);
22696        for val in &self.messages {
22697            __tmp.put_u8(*val);
22698        }
22699        if matches!(version, MavlinkVersion::V2) {
22700            let len = __tmp.len();
22701            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22702        } else {
22703            __tmp.len()
22704        }
22705    }
22706}
22707#[doc = "Data for filling the OpenDroneID Operator ID message, which contains the CAA (Civil Aviation Authority) issued operator ID."]
22708#[doc = ""]
22709#[doc = "ID: 12905"]
22710#[derive(Debug, Clone, PartialEq)]
22711#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22712#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22713pub struct OPEN_DRONE_ID_OPERATOR_ID_DATA {
22714    #[doc = "System ID (0 for broadcast)."]
22715    pub target_system: u8,
22716    #[doc = "Component ID (0 for broadcast)."]
22717    pub target_component: u8,
22718    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
22719    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22720    pub id_or_mac: [u8; 20],
22721    #[doc = "Indicates the type of the operator_id field."]
22722    pub operator_id_type: MavOdidOperatorIdType,
22723    #[doc = "Text description or numeric value expressed as ASCII characters. Shall be filled with nulls in the unused portion of the field."]
22724    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22725    pub operator_id: [u8; 20],
22726}
22727impl OPEN_DRONE_ID_OPERATOR_ID_DATA {
22728    pub const ENCODED_LEN: usize = 43usize;
22729    pub const DEFAULT: Self = Self {
22730        target_system: 0_u8,
22731        target_component: 0_u8,
22732        id_or_mac: [0_u8; 20usize],
22733        operator_id_type: MavOdidOperatorIdType::DEFAULT,
22734        operator_id: [0_u8; 20usize],
22735    };
22736    #[cfg(feature = "arbitrary")]
22737    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22738        use arbitrary::{Arbitrary, Unstructured};
22739        let mut buf = [0u8; 1024];
22740        rng.fill_bytes(&mut buf);
22741        let mut unstructured = Unstructured::new(&buf);
22742        Self::arbitrary(&mut unstructured).unwrap_or_default()
22743    }
22744}
22745impl Default for OPEN_DRONE_ID_OPERATOR_ID_DATA {
22746    fn default() -> Self {
22747        Self::DEFAULT.clone()
22748    }
22749}
22750impl MessageData for OPEN_DRONE_ID_OPERATOR_ID_DATA {
22751    type Message = MavMessage;
22752    const ID: u32 = 12905u32;
22753    const NAME: &'static str = "OPEN_DRONE_ID_OPERATOR_ID";
22754    const EXTRA_CRC: u8 = 49u8;
22755    const ENCODED_LEN: usize = 43usize;
22756    fn deser(
22757        _version: MavlinkVersion,
22758        __input: &[u8],
22759    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22760        let avail_len = __input.len();
22761        let mut payload_buf = [0; Self::ENCODED_LEN];
22762        let mut buf = if avail_len < Self::ENCODED_LEN {
22763            payload_buf[0..avail_len].copy_from_slice(__input);
22764            Bytes::new(&payload_buf)
22765        } else {
22766            Bytes::new(__input)
22767        };
22768        let mut __struct = Self::default();
22769        __struct.target_system = buf.get_u8();
22770        __struct.target_component = buf.get_u8();
22771        for v in &mut __struct.id_or_mac {
22772            let val = buf.get_u8();
22773            *v = val;
22774        }
22775        let tmp = buf.get_u8();
22776        __struct.operator_id_type =
22777            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22778                enum_type: "MavOdidOperatorIdType",
22779                value: tmp as u32,
22780            })?;
22781        for v in &mut __struct.operator_id {
22782            let val = buf.get_u8();
22783            *v = val;
22784        }
22785        Ok(__struct)
22786    }
22787    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22788        let mut __tmp = BytesMut::new(bytes);
22789        #[allow(clippy::absurd_extreme_comparisons)]
22790        #[allow(unused_comparisons)]
22791        if __tmp.remaining() < Self::ENCODED_LEN {
22792            panic!(
22793                "buffer is too small (need {} bytes, but got {})",
22794                Self::ENCODED_LEN,
22795                __tmp.remaining(),
22796            )
22797        }
22798        __tmp.put_u8(self.target_system);
22799        __tmp.put_u8(self.target_component);
22800        for val in &self.id_or_mac {
22801            __tmp.put_u8(*val);
22802        }
22803        __tmp.put_u8(self.operator_id_type as u8);
22804        for val in &self.operator_id {
22805            __tmp.put_u8(*val);
22806        }
22807        if matches!(version, MavlinkVersion::V2) {
22808            let len = __tmp.len();
22809            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22810        } else {
22811            __tmp.len()
22812        }
22813    }
22814}
22815#[doc = "Data for filling the OpenDroneID Self ID message. The Self ID Message is an opportunity for the operator to (optionally) declare their identity and purpose of the flight. This message can provide additional information that could reduce the threat profile of a UA (Unmanned Aircraft) flying in a particular area or manner. This message can also be used to provide optional additional clarification in an emergency/remote ID system failure situation."]
22816#[doc = ""]
22817#[doc = "ID: 12903"]
22818#[derive(Debug, Clone, PartialEq)]
22819#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22820#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22821pub struct OPEN_DRONE_ID_SELF_ID_DATA {
22822    #[doc = "System ID (0 for broadcast)."]
22823    pub target_system: u8,
22824    #[doc = "Component ID (0 for broadcast)."]
22825    pub target_component: u8,
22826    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
22827    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22828    pub id_or_mac: [u8; 20],
22829    #[doc = "Indicates the type of the description field."]
22830    pub description_type: MavOdidDescType,
22831    #[doc = "Text description or numeric value expressed as ASCII characters. Shall be filled with nulls in the unused portion of the field."]
22832    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22833    pub description: [u8; 23],
22834}
22835impl OPEN_DRONE_ID_SELF_ID_DATA {
22836    pub const ENCODED_LEN: usize = 46usize;
22837    pub const DEFAULT: Self = Self {
22838        target_system: 0_u8,
22839        target_component: 0_u8,
22840        id_or_mac: [0_u8; 20usize],
22841        description_type: MavOdidDescType::DEFAULT,
22842        description: [0_u8; 23usize],
22843    };
22844    #[cfg(feature = "arbitrary")]
22845    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22846        use arbitrary::{Arbitrary, Unstructured};
22847        let mut buf = [0u8; 1024];
22848        rng.fill_bytes(&mut buf);
22849        let mut unstructured = Unstructured::new(&buf);
22850        Self::arbitrary(&mut unstructured).unwrap_or_default()
22851    }
22852}
22853impl Default for OPEN_DRONE_ID_SELF_ID_DATA {
22854    fn default() -> Self {
22855        Self::DEFAULT.clone()
22856    }
22857}
22858impl MessageData for OPEN_DRONE_ID_SELF_ID_DATA {
22859    type Message = MavMessage;
22860    const ID: u32 = 12903u32;
22861    const NAME: &'static str = "OPEN_DRONE_ID_SELF_ID";
22862    const EXTRA_CRC: u8 = 249u8;
22863    const ENCODED_LEN: usize = 46usize;
22864    fn deser(
22865        _version: MavlinkVersion,
22866        __input: &[u8],
22867    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22868        let avail_len = __input.len();
22869        let mut payload_buf = [0; Self::ENCODED_LEN];
22870        let mut buf = if avail_len < Self::ENCODED_LEN {
22871            payload_buf[0..avail_len].copy_from_slice(__input);
22872            Bytes::new(&payload_buf)
22873        } else {
22874            Bytes::new(__input)
22875        };
22876        let mut __struct = Self::default();
22877        __struct.target_system = buf.get_u8();
22878        __struct.target_component = buf.get_u8();
22879        for v in &mut __struct.id_or_mac {
22880            let val = buf.get_u8();
22881            *v = val;
22882        }
22883        let tmp = buf.get_u8();
22884        __struct.description_type =
22885            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22886                enum_type: "MavOdidDescType",
22887                value: tmp as u32,
22888            })?;
22889        for v in &mut __struct.description {
22890            let val = buf.get_u8();
22891            *v = val;
22892        }
22893        Ok(__struct)
22894    }
22895    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22896        let mut __tmp = BytesMut::new(bytes);
22897        #[allow(clippy::absurd_extreme_comparisons)]
22898        #[allow(unused_comparisons)]
22899        if __tmp.remaining() < Self::ENCODED_LEN {
22900            panic!(
22901                "buffer is too small (need {} bytes, but got {})",
22902                Self::ENCODED_LEN,
22903                __tmp.remaining(),
22904            )
22905        }
22906        __tmp.put_u8(self.target_system);
22907        __tmp.put_u8(self.target_component);
22908        for val in &self.id_or_mac {
22909            __tmp.put_u8(*val);
22910        }
22911        __tmp.put_u8(self.description_type as u8);
22912        for val in &self.description {
22913            __tmp.put_u8(*val);
22914        }
22915        if matches!(version, MavlinkVersion::V2) {
22916            let len = __tmp.len();
22917            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22918        } else {
22919            __tmp.len()
22920        }
22921    }
22922}
22923#[doc = "Data for filling the OpenDroneID System message. The System Message contains general system information including the operator location/altitude and possible aircraft group and/or category/class information."]
22924#[doc = ""]
22925#[doc = "ID: 12904"]
22926#[derive(Debug, Clone, PartialEq)]
22927#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22928#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22929pub struct OPEN_DRONE_ID_SYSTEM_DATA {
22930    #[doc = "Latitude of the operator. If unknown: 0 (both Lat/Lon)."]
22931    pub operator_latitude: i32,
22932    #[doc = "Longitude of the operator. If unknown: 0 (both Lat/Lon)."]
22933    pub operator_longitude: i32,
22934    #[doc = "Area Operations Ceiling relative to WGS84. If unknown: -1000 m. Used only for swarms/multiple UA."]
22935    pub area_ceiling: f32,
22936    #[doc = "Area Operations Floor relative to WGS84. If unknown: -1000 m. Used only for swarms/multiple UA."]
22937    pub area_floor: f32,
22938    #[doc = "Geodetic altitude of the operator relative to WGS84. If unknown: -1000 m."]
22939    pub operator_altitude_geo: f32,
22940    #[doc = "32 bit Unix Timestamp in seconds since 00:00:00 01/01/2019."]
22941    pub timestamp: u32,
22942    #[doc = "Number of aircraft in the area, group or formation (default 1). Used only for swarms/multiple UA."]
22943    pub area_count: u16,
22944    #[doc = "Radius of the cylindrical area of the group or formation (default 0). Used only for swarms/multiple UA."]
22945    pub area_radius: u16,
22946    #[doc = "System ID (0 for broadcast)."]
22947    pub target_system: u8,
22948    #[doc = "Component ID (0 for broadcast)."]
22949    pub target_component: u8,
22950    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
22951    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22952    pub id_or_mac: [u8; 20],
22953    #[doc = "Specifies the operator location type."]
22954    pub operator_location_type: MavOdidOperatorLocationType,
22955    #[doc = "Specifies the classification type of the UA."]
22956    pub classification_type: MavOdidClassificationType,
22957    #[doc = "When classification_type is MAV_ODID_CLASSIFICATION_TYPE_EU, specifies the category of the UA."]
22958    pub category_eu: MavOdidCategoryEu,
22959    #[doc = "When classification_type is MAV_ODID_CLASSIFICATION_TYPE_EU, specifies the class of the UA."]
22960    pub class_eu: MavOdidClassEu,
22961}
22962impl OPEN_DRONE_ID_SYSTEM_DATA {
22963    pub const ENCODED_LEN: usize = 54usize;
22964    pub const DEFAULT: Self = Self {
22965        operator_latitude: 0_i32,
22966        operator_longitude: 0_i32,
22967        area_ceiling: 0.0_f32,
22968        area_floor: 0.0_f32,
22969        operator_altitude_geo: 0.0_f32,
22970        timestamp: 0_u32,
22971        area_count: 0_u16,
22972        area_radius: 0_u16,
22973        target_system: 0_u8,
22974        target_component: 0_u8,
22975        id_or_mac: [0_u8; 20usize],
22976        operator_location_type: MavOdidOperatorLocationType::DEFAULT,
22977        classification_type: MavOdidClassificationType::DEFAULT,
22978        category_eu: MavOdidCategoryEu::DEFAULT,
22979        class_eu: MavOdidClassEu::DEFAULT,
22980    };
22981    #[cfg(feature = "arbitrary")]
22982    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22983        use arbitrary::{Arbitrary, Unstructured};
22984        let mut buf = [0u8; 1024];
22985        rng.fill_bytes(&mut buf);
22986        let mut unstructured = Unstructured::new(&buf);
22987        Self::arbitrary(&mut unstructured).unwrap_or_default()
22988    }
22989}
22990impl Default for OPEN_DRONE_ID_SYSTEM_DATA {
22991    fn default() -> Self {
22992        Self::DEFAULT.clone()
22993    }
22994}
22995impl MessageData for OPEN_DRONE_ID_SYSTEM_DATA {
22996    type Message = MavMessage;
22997    const ID: u32 = 12904u32;
22998    const NAME: &'static str = "OPEN_DRONE_ID_SYSTEM";
22999    const EXTRA_CRC: u8 = 77u8;
23000    const ENCODED_LEN: usize = 54usize;
23001    fn deser(
23002        _version: MavlinkVersion,
23003        __input: &[u8],
23004    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23005        let avail_len = __input.len();
23006        let mut payload_buf = [0; Self::ENCODED_LEN];
23007        let mut buf = if avail_len < Self::ENCODED_LEN {
23008            payload_buf[0..avail_len].copy_from_slice(__input);
23009            Bytes::new(&payload_buf)
23010        } else {
23011            Bytes::new(__input)
23012        };
23013        let mut __struct = Self::default();
23014        __struct.operator_latitude = buf.get_i32_le();
23015        __struct.operator_longitude = buf.get_i32_le();
23016        __struct.area_ceiling = buf.get_f32_le();
23017        __struct.area_floor = buf.get_f32_le();
23018        __struct.operator_altitude_geo = buf.get_f32_le();
23019        __struct.timestamp = buf.get_u32_le();
23020        __struct.area_count = buf.get_u16_le();
23021        __struct.area_radius = buf.get_u16_le();
23022        __struct.target_system = buf.get_u8();
23023        __struct.target_component = buf.get_u8();
23024        for v in &mut __struct.id_or_mac {
23025            let val = buf.get_u8();
23026            *v = val;
23027        }
23028        let tmp = buf.get_u8();
23029        __struct.operator_location_type =
23030            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23031                enum_type: "MavOdidOperatorLocationType",
23032                value: tmp as u32,
23033            })?;
23034        let tmp = buf.get_u8();
23035        __struct.classification_type =
23036            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23037                enum_type: "MavOdidClassificationType",
23038                value: tmp as u32,
23039            })?;
23040        let tmp = buf.get_u8();
23041        __struct.category_eu =
23042            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23043                enum_type: "MavOdidCategoryEu",
23044                value: tmp as u32,
23045            })?;
23046        let tmp = buf.get_u8();
23047        __struct.class_eu =
23048            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23049                enum_type: "MavOdidClassEu",
23050                value: tmp as u32,
23051            })?;
23052        Ok(__struct)
23053    }
23054    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23055        let mut __tmp = BytesMut::new(bytes);
23056        #[allow(clippy::absurd_extreme_comparisons)]
23057        #[allow(unused_comparisons)]
23058        if __tmp.remaining() < Self::ENCODED_LEN {
23059            panic!(
23060                "buffer is too small (need {} bytes, but got {})",
23061                Self::ENCODED_LEN,
23062                __tmp.remaining(),
23063            )
23064        }
23065        __tmp.put_i32_le(self.operator_latitude);
23066        __tmp.put_i32_le(self.operator_longitude);
23067        __tmp.put_f32_le(self.area_ceiling);
23068        __tmp.put_f32_le(self.area_floor);
23069        __tmp.put_f32_le(self.operator_altitude_geo);
23070        __tmp.put_u32_le(self.timestamp);
23071        __tmp.put_u16_le(self.area_count);
23072        __tmp.put_u16_le(self.area_radius);
23073        __tmp.put_u8(self.target_system);
23074        __tmp.put_u8(self.target_component);
23075        for val in &self.id_or_mac {
23076            __tmp.put_u8(*val);
23077        }
23078        __tmp.put_u8(self.operator_location_type as u8);
23079        __tmp.put_u8(self.classification_type as u8);
23080        __tmp.put_u8(self.category_eu as u8);
23081        __tmp.put_u8(self.class_eu as u8);
23082        if matches!(version, MavlinkVersion::V2) {
23083            let len = __tmp.len();
23084            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23085        } else {
23086            __tmp.len()
23087        }
23088    }
23089}
23090#[doc = "Update the data in the OPEN_DRONE_ID_SYSTEM message with new location information. This can be sent to update the location information for the operator when no other information in the SYSTEM message has changed. This message allows for efficient operation on radio links which have limited uplink bandwidth while meeting requirements for update frequency of the operator location."]
23091#[doc = ""]
23092#[doc = "ID: 12919"]
23093#[derive(Debug, Clone, PartialEq)]
23094#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23095#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23096pub struct OPEN_DRONE_ID_SYSTEM_UPDATE_DATA {
23097    #[doc = "Latitude of the operator. If unknown: 0 (both Lat/Lon)."]
23098    pub operator_latitude: i32,
23099    #[doc = "Longitude of the operator. If unknown: 0 (both Lat/Lon)."]
23100    pub operator_longitude: i32,
23101    #[doc = "Geodetic altitude of the operator relative to WGS84. If unknown: -1000 m."]
23102    pub operator_altitude_geo: f32,
23103    #[doc = "32 bit Unix Timestamp in seconds since 00:00:00 01/01/2019."]
23104    pub timestamp: u32,
23105    #[doc = "System ID (0 for broadcast)."]
23106    pub target_system: u8,
23107    #[doc = "Component ID (0 for broadcast)."]
23108    pub target_component: u8,
23109}
23110impl OPEN_DRONE_ID_SYSTEM_UPDATE_DATA {
23111    pub const ENCODED_LEN: usize = 18usize;
23112    pub const DEFAULT: Self = Self {
23113        operator_latitude: 0_i32,
23114        operator_longitude: 0_i32,
23115        operator_altitude_geo: 0.0_f32,
23116        timestamp: 0_u32,
23117        target_system: 0_u8,
23118        target_component: 0_u8,
23119    };
23120    #[cfg(feature = "arbitrary")]
23121    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23122        use arbitrary::{Arbitrary, Unstructured};
23123        let mut buf = [0u8; 1024];
23124        rng.fill_bytes(&mut buf);
23125        let mut unstructured = Unstructured::new(&buf);
23126        Self::arbitrary(&mut unstructured).unwrap_or_default()
23127    }
23128}
23129impl Default for OPEN_DRONE_ID_SYSTEM_UPDATE_DATA {
23130    fn default() -> Self {
23131        Self::DEFAULT.clone()
23132    }
23133}
23134impl MessageData for OPEN_DRONE_ID_SYSTEM_UPDATE_DATA {
23135    type Message = MavMessage;
23136    const ID: u32 = 12919u32;
23137    const NAME: &'static str = "OPEN_DRONE_ID_SYSTEM_UPDATE";
23138    const EXTRA_CRC: u8 = 7u8;
23139    const ENCODED_LEN: usize = 18usize;
23140    fn deser(
23141        _version: MavlinkVersion,
23142        __input: &[u8],
23143    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23144        let avail_len = __input.len();
23145        let mut payload_buf = [0; Self::ENCODED_LEN];
23146        let mut buf = if avail_len < Self::ENCODED_LEN {
23147            payload_buf[0..avail_len].copy_from_slice(__input);
23148            Bytes::new(&payload_buf)
23149        } else {
23150            Bytes::new(__input)
23151        };
23152        let mut __struct = Self::default();
23153        __struct.operator_latitude = buf.get_i32_le();
23154        __struct.operator_longitude = buf.get_i32_le();
23155        __struct.operator_altitude_geo = buf.get_f32_le();
23156        __struct.timestamp = buf.get_u32_le();
23157        __struct.target_system = buf.get_u8();
23158        __struct.target_component = buf.get_u8();
23159        Ok(__struct)
23160    }
23161    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23162        let mut __tmp = BytesMut::new(bytes);
23163        #[allow(clippy::absurd_extreme_comparisons)]
23164        #[allow(unused_comparisons)]
23165        if __tmp.remaining() < Self::ENCODED_LEN {
23166            panic!(
23167                "buffer is too small (need {} bytes, but got {})",
23168                Self::ENCODED_LEN,
23169                __tmp.remaining(),
23170            )
23171        }
23172        __tmp.put_i32_le(self.operator_latitude);
23173        __tmp.put_i32_le(self.operator_longitude);
23174        __tmp.put_f32_le(self.operator_altitude_geo);
23175        __tmp.put_u32_le(self.timestamp);
23176        __tmp.put_u8(self.target_system);
23177        __tmp.put_u8(self.target_component);
23178        if matches!(version, MavlinkVersion::V2) {
23179            let len = __tmp.len();
23180            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23181        } else {
23182            __tmp.len()
23183        }
23184    }
23185}
23186#[doc = "Optical flow from a flow sensor (e.g. optical mouse sensor)."]
23187#[doc = ""]
23188#[doc = "ID: 100"]
23189#[derive(Debug, Clone, PartialEq)]
23190#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23191#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23192pub struct OPTICAL_FLOW_DATA {
23193    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
23194    pub time_usec: u64,
23195    #[doc = "Flow in x-sensor direction, angular-speed compensated"]
23196    pub flow_comp_m_x: f32,
23197    #[doc = "Flow in y-sensor direction, angular-speed compensated"]
23198    pub flow_comp_m_y: f32,
23199    #[doc = "Ground distance. Positive value: distance known. Negative value: Unknown distance"]
23200    pub ground_distance: f32,
23201    #[doc = "Flow in x-sensor direction"]
23202    pub flow_x: i16,
23203    #[doc = "Flow in y-sensor direction"]
23204    pub flow_y: i16,
23205    #[doc = "Sensor ID"]
23206    pub sensor_id: u8,
23207    #[doc = "Optical flow quality / confidence. 0: bad, 255: maximum quality"]
23208    pub quality: u8,
23209    #[doc = "Flow rate about X axis"]
23210    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
23211    pub flow_rate_x: f32,
23212    #[doc = "Flow rate about Y axis"]
23213    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
23214    pub flow_rate_y: f32,
23215}
23216impl OPTICAL_FLOW_DATA {
23217    pub const ENCODED_LEN: usize = 34usize;
23218    pub const DEFAULT: Self = Self {
23219        time_usec: 0_u64,
23220        flow_comp_m_x: 0.0_f32,
23221        flow_comp_m_y: 0.0_f32,
23222        ground_distance: 0.0_f32,
23223        flow_x: 0_i16,
23224        flow_y: 0_i16,
23225        sensor_id: 0_u8,
23226        quality: 0_u8,
23227        flow_rate_x: 0.0_f32,
23228        flow_rate_y: 0.0_f32,
23229    };
23230    #[cfg(feature = "arbitrary")]
23231    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23232        use arbitrary::{Arbitrary, Unstructured};
23233        let mut buf = [0u8; 1024];
23234        rng.fill_bytes(&mut buf);
23235        let mut unstructured = Unstructured::new(&buf);
23236        Self::arbitrary(&mut unstructured).unwrap_or_default()
23237    }
23238}
23239impl Default for OPTICAL_FLOW_DATA {
23240    fn default() -> Self {
23241        Self::DEFAULT.clone()
23242    }
23243}
23244impl MessageData for OPTICAL_FLOW_DATA {
23245    type Message = MavMessage;
23246    const ID: u32 = 100u32;
23247    const NAME: &'static str = "OPTICAL_FLOW";
23248    const EXTRA_CRC: u8 = 175u8;
23249    const ENCODED_LEN: usize = 34usize;
23250    fn deser(
23251        _version: MavlinkVersion,
23252        __input: &[u8],
23253    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23254        let avail_len = __input.len();
23255        let mut payload_buf = [0; Self::ENCODED_LEN];
23256        let mut buf = if avail_len < Self::ENCODED_LEN {
23257            payload_buf[0..avail_len].copy_from_slice(__input);
23258            Bytes::new(&payload_buf)
23259        } else {
23260            Bytes::new(__input)
23261        };
23262        let mut __struct = Self::default();
23263        __struct.time_usec = buf.get_u64_le();
23264        __struct.flow_comp_m_x = buf.get_f32_le();
23265        __struct.flow_comp_m_y = buf.get_f32_le();
23266        __struct.ground_distance = buf.get_f32_le();
23267        __struct.flow_x = buf.get_i16_le();
23268        __struct.flow_y = buf.get_i16_le();
23269        __struct.sensor_id = buf.get_u8();
23270        __struct.quality = buf.get_u8();
23271        __struct.flow_rate_x = buf.get_f32_le();
23272        __struct.flow_rate_y = buf.get_f32_le();
23273        Ok(__struct)
23274    }
23275    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23276        let mut __tmp = BytesMut::new(bytes);
23277        #[allow(clippy::absurd_extreme_comparisons)]
23278        #[allow(unused_comparisons)]
23279        if __tmp.remaining() < Self::ENCODED_LEN {
23280            panic!(
23281                "buffer is too small (need {} bytes, but got {})",
23282                Self::ENCODED_LEN,
23283                __tmp.remaining(),
23284            )
23285        }
23286        __tmp.put_u64_le(self.time_usec);
23287        __tmp.put_f32_le(self.flow_comp_m_x);
23288        __tmp.put_f32_le(self.flow_comp_m_y);
23289        __tmp.put_f32_le(self.ground_distance);
23290        __tmp.put_i16_le(self.flow_x);
23291        __tmp.put_i16_le(self.flow_y);
23292        __tmp.put_u8(self.sensor_id);
23293        __tmp.put_u8(self.quality);
23294        if matches!(version, MavlinkVersion::V2) {
23295            __tmp.put_f32_le(self.flow_rate_x);
23296            __tmp.put_f32_le(self.flow_rate_y);
23297            let len = __tmp.len();
23298            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23299        } else {
23300            __tmp.len()
23301        }
23302    }
23303}
23304#[doc = "Optical flow from an angular rate flow sensor (e.g. PX4FLOW or mouse sensor)."]
23305#[doc = ""]
23306#[doc = "ID: 106"]
23307#[derive(Debug, Clone, PartialEq)]
23308#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23309#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23310pub struct OPTICAL_FLOW_RAD_DATA {
23311    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
23312    pub time_usec: u64,
23313    #[doc = "Integration time. Divide integrated_x and integrated_y by the integration time to obtain average flow. The integration time also indicates the."]
23314    pub integration_time_us: u32,
23315    #[doc = "Flow around X axis (Sensor RH rotation about the X axis induces a positive flow. Sensor linear motion along the positive Y axis induces a negative flow.)"]
23316    pub integrated_x: f32,
23317    #[doc = "Flow around Y axis (Sensor RH rotation about the Y axis induces a positive flow. Sensor linear motion along the positive X axis induces a positive flow.)"]
23318    pub integrated_y: f32,
23319    #[doc = "RH rotation around X axis"]
23320    pub integrated_xgyro: f32,
23321    #[doc = "RH rotation around Y axis"]
23322    pub integrated_ygyro: f32,
23323    #[doc = "RH rotation around Z axis"]
23324    pub integrated_zgyro: f32,
23325    #[doc = "Time since the distance was sampled."]
23326    pub time_delta_distance_us: u32,
23327    #[doc = "Distance to the center of the flow field. Positive value (including zero): distance known. Negative value: Unknown distance."]
23328    pub distance: f32,
23329    #[doc = "Temperature"]
23330    pub temperature: i16,
23331    #[doc = "Sensor ID"]
23332    pub sensor_id: u8,
23333    #[doc = "Optical flow quality / confidence. 0: no valid flow, 255: maximum quality"]
23334    pub quality: u8,
23335}
23336impl OPTICAL_FLOW_RAD_DATA {
23337    pub const ENCODED_LEN: usize = 44usize;
23338    pub const DEFAULT: Self = Self {
23339        time_usec: 0_u64,
23340        integration_time_us: 0_u32,
23341        integrated_x: 0.0_f32,
23342        integrated_y: 0.0_f32,
23343        integrated_xgyro: 0.0_f32,
23344        integrated_ygyro: 0.0_f32,
23345        integrated_zgyro: 0.0_f32,
23346        time_delta_distance_us: 0_u32,
23347        distance: 0.0_f32,
23348        temperature: 0_i16,
23349        sensor_id: 0_u8,
23350        quality: 0_u8,
23351    };
23352    #[cfg(feature = "arbitrary")]
23353    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23354        use arbitrary::{Arbitrary, Unstructured};
23355        let mut buf = [0u8; 1024];
23356        rng.fill_bytes(&mut buf);
23357        let mut unstructured = Unstructured::new(&buf);
23358        Self::arbitrary(&mut unstructured).unwrap_or_default()
23359    }
23360}
23361impl Default for OPTICAL_FLOW_RAD_DATA {
23362    fn default() -> Self {
23363        Self::DEFAULT.clone()
23364    }
23365}
23366impl MessageData for OPTICAL_FLOW_RAD_DATA {
23367    type Message = MavMessage;
23368    const ID: u32 = 106u32;
23369    const NAME: &'static str = "OPTICAL_FLOW_RAD";
23370    const EXTRA_CRC: u8 = 138u8;
23371    const ENCODED_LEN: usize = 44usize;
23372    fn deser(
23373        _version: MavlinkVersion,
23374        __input: &[u8],
23375    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23376        let avail_len = __input.len();
23377        let mut payload_buf = [0; Self::ENCODED_LEN];
23378        let mut buf = if avail_len < Self::ENCODED_LEN {
23379            payload_buf[0..avail_len].copy_from_slice(__input);
23380            Bytes::new(&payload_buf)
23381        } else {
23382            Bytes::new(__input)
23383        };
23384        let mut __struct = Self::default();
23385        __struct.time_usec = buf.get_u64_le();
23386        __struct.integration_time_us = buf.get_u32_le();
23387        __struct.integrated_x = buf.get_f32_le();
23388        __struct.integrated_y = buf.get_f32_le();
23389        __struct.integrated_xgyro = buf.get_f32_le();
23390        __struct.integrated_ygyro = buf.get_f32_le();
23391        __struct.integrated_zgyro = buf.get_f32_le();
23392        __struct.time_delta_distance_us = buf.get_u32_le();
23393        __struct.distance = buf.get_f32_le();
23394        __struct.temperature = buf.get_i16_le();
23395        __struct.sensor_id = buf.get_u8();
23396        __struct.quality = buf.get_u8();
23397        Ok(__struct)
23398    }
23399    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23400        let mut __tmp = BytesMut::new(bytes);
23401        #[allow(clippy::absurd_extreme_comparisons)]
23402        #[allow(unused_comparisons)]
23403        if __tmp.remaining() < Self::ENCODED_LEN {
23404            panic!(
23405                "buffer is too small (need {} bytes, but got {})",
23406                Self::ENCODED_LEN,
23407                __tmp.remaining(),
23408            )
23409        }
23410        __tmp.put_u64_le(self.time_usec);
23411        __tmp.put_u32_le(self.integration_time_us);
23412        __tmp.put_f32_le(self.integrated_x);
23413        __tmp.put_f32_le(self.integrated_y);
23414        __tmp.put_f32_le(self.integrated_xgyro);
23415        __tmp.put_f32_le(self.integrated_ygyro);
23416        __tmp.put_f32_le(self.integrated_zgyro);
23417        __tmp.put_u32_le(self.time_delta_distance_us);
23418        __tmp.put_f32_le(self.distance);
23419        __tmp.put_i16_le(self.temperature);
23420        __tmp.put_u8(self.sensor_id);
23421        __tmp.put_u8(self.quality);
23422        if matches!(version, MavlinkVersion::V2) {
23423            let len = __tmp.len();
23424            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23425        } else {
23426            __tmp.len()
23427        }
23428    }
23429}
23430#[doc = "Vehicle status report that is sent out while orbit execution is in progress (see MAV_CMD_DO_ORBIT)."]
23431#[doc = ""]
23432#[doc = "ID: 360"]
23433#[derive(Debug, Clone, PartialEq)]
23434#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23435#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23436pub struct ORBIT_EXECUTION_STATUS_DATA {
23437    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
23438    pub time_usec: u64,
23439    #[doc = "Radius of the orbit circle. Positive values orbit clockwise, negative values orbit counter-clockwise."]
23440    pub radius: f32,
23441    #[doc = "X coordinate of center point. Coordinate system depends on frame field: local = x position in meters * 1e4, global = latitude in degrees * 1e7."]
23442    pub x: i32,
23443    #[doc = "Y coordinate of center point.  Coordinate system depends on frame field: local = x position in meters * 1e4, global = latitude in degrees * 1e7."]
23444    pub y: i32,
23445    #[doc = "Altitude of center point. Coordinate system depends on frame field."]
23446    pub z: f32,
23447    #[doc = "The coordinate system of the fields: x, y, z."]
23448    pub frame: MavFrame,
23449}
23450impl ORBIT_EXECUTION_STATUS_DATA {
23451    pub const ENCODED_LEN: usize = 25usize;
23452    pub const DEFAULT: Self = Self {
23453        time_usec: 0_u64,
23454        radius: 0.0_f32,
23455        x: 0_i32,
23456        y: 0_i32,
23457        z: 0.0_f32,
23458        frame: MavFrame::DEFAULT,
23459    };
23460    #[cfg(feature = "arbitrary")]
23461    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23462        use arbitrary::{Arbitrary, Unstructured};
23463        let mut buf = [0u8; 1024];
23464        rng.fill_bytes(&mut buf);
23465        let mut unstructured = Unstructured::new(&buf);
23466        Self::arbitrary(&mut unstructured).unwrap_or_default()
23467    }
23468}
23469impl Default for ORBIT_EXECUTION_STATUS_DATA {
23470    fn default() -> Self {
23471        Self::DEFAULT.clone()
23472    }
23473}
23474impl MessageData for ORBIT_EXECUTION_STATUS_DATA {
23475    type Message = MavMessage;
23476    const ID: u32 = 360u32;
23477    const NAME: &'static str = "ORBIT_EXECUTION_STATUS";
23478    const EXTRA_CRC: u8 = 11u8;
23479    const ENCODED_LEN: usize = 25usize;
23480    fn deser(
23481        _version: MavlinkVersion,
23482        __input: &[u8],
23483    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23484        let avail_len = __input.len();
23485        let mut payload_buf = [0; Self::ENCODED_LEN];
23486        let mut buf = if avail_len < Self::ENCODED_LEN {
23487            payload_buf[0..avail_len].copy_from_slice(__input);
23488            Bytes::new(&payload_buf)
23489        } else {
23490            Bytes::new(__input)
23491        };
23492        let mut __struct = Self::default();
23493        __struct.time_usec = buf.get_u64_le();
23494        __struct.radius = buf.get_f32_le();
23495        __struct.x = buf.get_i32_le();
23496        __struct.y = buf.get_i32_le();
23497        __struct.z = buf.get_f32_le();
23498        let tmp = buf.get_u8();
23499        __struct.frame =
23500            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23501                enum_type: "MavFrame",
23502                value: tmp as u32,
23503            })?;
23504        Ok(__struct)
23505    }
23506    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23507        let mut __tmp = BytesMut::new(bytes);
23508        #[allow(clippy::absurd_extreme_comparisons)]
23509        #[allow(unused_comparisons)]
23510        if __tmp.remaining() < Self::ENCODED_LEN {
23511            panic!(
23512                "buffer is too small (need {} bytes, but got {})",
23513                Self::ENCODED_LEN,
23514                __tmp.remaining(),
23515            )
23516        }
23517        __tmp.put_u64_le(self.time_usec);
23518        __tmp.put_f32_le(self.radius);
23519        __tmp.put_i32_le(self.x);
23520        __tmp.put_i32_le(self.y);
23521        __tmp.put_f32_le(self.z);
23522        __tmp.put_u8(self.frame as u8);
23523        if matches!(version, MavlinkVersion::V2) {
23524            let len = __tmp.len();
23525            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23526        } else {
23527            __tmp.len()
23528        }
23529    }
23530}
23531#[doc = "Response from a PARAM_EXT_SET message."]
23532#[doc = ""]
23533#[doc = "ID: 324"]
23534#[derive(Debug, Clone, PartialEq)]
23535#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23536#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23537pub struct PARAM_EXT_ACK_DATA {
23538    #[doc = "Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
23539    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23540    pub param_id: [u8; 16],
23541    #[doc = "Parameter value (new value if PARAM_ACK_ACCEPTED, current value otherwise)"]
23542    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23543    pub param_value: [u8; 128],
23544    #[doc = "Parameter type."]
23545    pub param_type: MavParamExtType,
23546    #[doc = "Result code."]
23547    pub param_result: ParamAck,
23548}
23549impl PARAM_EXT_ACK_DATA {
23550    pub const ENCODED_LEN: usize = 146usize;
23551    pub const DEFAULT: Self = Self {
23552        param_id: [0_u8; 16usize],
23553        param_value: [0_u8; 128usize],
23554        param_type: MavParamExtType::DEFAULT,
23555        param_result: ParamAck::DEFAULT,
23556    };
23557    #[cfg(feature = "arbitrary")]
23558    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23559        use arbitrary::{Arbitrary, Unstructured};
23560        let mut buf = [0u8; 1024];
23561        rng.fill_bytes(&mut buf);
23562        let mut unstructured = Unstructured::new(&buf);
23563        Self::arbitrary(&mut unstructured).unwrap_or_default()
23564    }
23565}
23566impl Default for PARAM_EXT_ACK_DATA {
23567    fn default() -> Self {
23568        Self::DEFAULT.clone()
23569    }
23570}
23571impl MessageData for PARAM_EXT_ACK_DATA {
23572    type Message = MavMessage;
23573    const ID: u32 = 324u32;
23574    const NAME: &'static str = "PARAM_EXT_ACK";
23575    const EXTRA_CRC: u8 = 132u8;
23576    const ENCODED_LEN: usize = 146usize;
23577    fn deser(
23578        _version: MavlinkVersion,
23579        __input: &[u8],
23580    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23581        let avail_len = __input.len();
23582        let mut payload_buf = [0; Self::ENCODED_LEN];
23583        let mut buf = if avail_len < Self::ENCODED_LEN {
23584            payload_buf[0..avail_len].copy_from_slice(__input);
23585            Bytes::new(&payload_buf)
23586        } else {
23587            Bytes::new(__input)
23588        };
23589        let mut __struct = Self::default();
23590        for v in &mut __struct.param_id {
23591            let val = buf.get_u8();
23592            *v = val;
23593        }
23594        for v in &mut __struct.param_value {
23595            let val = buf.get_u8();
23596            *v = val;
23597        }
23598        let tmp = buf.get_u8();
23599        __struct.param_type =
23600            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23601                enum_type: "MavParamExtType",
23602                value: tmp as u32,
23603            })?;
23604        let tmp = buf.get_u8();
23605        __struct.param_result =
23606            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23607                enum_type: "ParamAck",
23608                value: tmp as u32,
23609            })?;
23610        Ok(__struct)
23611    }
23612    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23613        let mut __tmp = BytesMut::new(bytes);
23614        #[allow(clippy::absurd_extreme_comparisons)]
23615        #[allow(unused_comparisons)]
23616        if __tmp.remaining() < Self::ENCODED_LEN {
23617            panic!(
23618                "buffer is too small (need {} bytes, but got {})",
23619                Self::ENCODED_LEN,
23620                __tmp.remaining(),
23621            )
23622        }
23623        for val in &self.param_id {
23624            __tmp.put_u8(*val);
23625        }
23626        for val in &self.param_value {
23627            __tmp.put_u8(*val);
23628        }
23629        __tmp.put_u8(self.param_type as u8);
23630        __tmp.put_u8(self.param_result as u8);
23631        if matches!(version, MavlinkVersion::V2) {
23632            let len = __tmp.len();
23633            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23634        } else {
23635            __tmp.len()
23636        }
23637    }
23638}
23639#[doc = "Request all parameters of this component. All parameters should be emitted in response as PARAM_EXT_VALUE."]
23640#[doc = ""]
23641#[doc = "ID: 321"]
23642#[derive(Debug, Clone, PartialEq)]
23643#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23644#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23645pub struct PARAM_EXT_REQUEST_LIST_DATA {
23646    #[doc = "System ID"]
23647    pub target_system: u8,
23648    #[doc = "Component ID"]
23649    pub target_component: u8,
23650}
23651impl PARAM_EXT_REQUEST_LIST_DATA {
23652    pub const ENCODED_LEN: usize = 2usize;
23653    pub const DEFAULT: Self = Self {
23654        target_system: 0_u8,
23655        target_component: 0_u8,
23656    };
23657    #[cfg(feature = "arbitrary")]
23658    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23659        use arbitrary::{Arbitrary, Unstructured};
23660        let mut buf = [0u8; 1024];
23661        rng.fill_bytes(&mut buf);
23662        let mut unstructured = Unstructured::new(&buf);
23663        Self::arbitrary(&mut unstructured).unwrap_or_default()
23664    }
23665}
23666impl Default for PARAM_EXT_REQUEST_LIST_DATA {
23667    fn default() -> Self {
23668        Self::DEFAULT.clone()
23669    }
23670}
23671impl MessageData for PARAM_EXT_REQUEST_LIST_DATA {
23672    type Message = MavMessage;
23673    const ID: u32 = 321u32;
23674    const NAME: &'static str = "PARAM_EXT_REQUEST_LIST";
23675    const EXTRA_CRC: u8 = 88u8;
23676    const ENCODED_LEN: usize = 2usize;
23677    fn deser(
23678        _version: MavlinkVersion,
23679        __input: &[u8],
23680    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23681        let avail_len = __input.len();
23682        let mut payload_buf = [0; Self::ENCODED_LEN];
23683        let mut buf = if avail_len < Self::ENCODED_LEN {
23684            payload_buf[0..avail_len].copy_from_slice(__input);
23685            Bytes::new(&payload_buf)
23686        } else {
23687            Bytes::new(__input)
23688        };
23689        let mut __struct = Self::default();
23690        __struct.target_system = buf.get_u8();
23691        __struct.target_component = buf.get_u8();
23692        Ok(__struct)
23693    }
23694    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23695        let mut __tmp = BytesMut::new(bytes);
23696        #[allow(clippy::absurd_extreme_comparisons)]
23697        #[allow(unused_comparisons)]
23698        if __tmp.remaining() < Self::ENCODED_LEN {
23699            panic!(
23700                "buffer is too small (need {} bytes, but got {})",
23701                Self::ENCODED_LEN,
23702                __tmp.remaining(),
23703            )
23704        }
23705        __tmp.put_u8(self.target_system);
23706        __tmp.put_u8(self.target_component);
23707        if matches!(version, MavlinkVersion::V2) {
23708            let len = __tmp.len();
23709            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23710        } else {
23711            __tmp.len()
23712        }
23713    }
23714}
23715#[doc = "Request to read the value of a parameter with either the param_id string id or param_index. PARAM_EXT_VALUE should be emitted in response."]
23716#[doc = ""]
23717#[doc = "ID: 320"]
23718#[derive(Debug, Clone, PartialEq)]
23719#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23720#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23721pub struct PARAM_EXT_REQUEST_READ_DATA {
23722    #[doc = "Parameter index. Set to -1 to use the Parameter ID field as identifier (else param_id will be ignored)"]
23723    pub param_index: i16,
23724    #[doc = "System ID"]
23725    pub target_system: u8,
23726    #[doc = "Component ID"]
23727    pub target_component: u8,
23728    #[doc = "Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
23729    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23730    pub param_id: [u8; 16],
23731}
23732impl PARAM_EXT_REQUEST_READ_DATA {
23733    pub const ENCODED_LEN: usize = 20usize;
23734    pub const DEFAULT: Self = Self {
23735        param_index: 0_i16,
23736        target_system: 0_u8,
23737        target_component: 0_u8,
23738        param_id: [0_u8; 16usize],
23739    };
23740    #[cfg(feature = "arbitrary")]
23741    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23742        use arbitrary::{Arbitrary, Unstructured};
23743        let mut buf = [0u8; 1024];
23744        rng.fill_bytes(&mut buf);
23745        let mut unstructured = Unstructured::new(&buf);
23746        Self::arbitrary(&mut unstructured).unwrap_or_default()
23747    }
23748}
23749impl Default for PARAM_EXT_REQUEST_READ_DATA {
23750    fn default() -> Self {
23751        Self::DEFAULT.clone()
23752    }
23753}
23754impl MessageData for PARAM_EXT_REQUEST_READ_DATA {
23755    type Message = MavMessage;
23756    const ID: u32 = 320u32;
23757    const NAME: &'static str = "PARAM_EXT_REQUEST_READ";
23758    const EXTRA_CRC: u8 = 243u8;
23759    const ENCODED_LEN: usize = 20usize;
23760    fn deser(
23761        _version: MavlinkVersion,
23762        __input: &[u8],
23763    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23764        let avail_len = __input.len();
23765        let mut payload_buf = [0; Self::ENCODED_LEN];
23766        let mut buf = if avail_len < Self::ENCODED_LEN {
23767            payload_buf[0..avail_len].copy_from_slice(__input);
23768            Bytes::new(&payload_buf)
23769        } else {
23770            Bytes::new(__input)
23771        };
23772        let mut __struct = Self::default();
23773        __struct.param_index = buf.get_i16_le();
23774        __struct.target_system = buf.get_u8();
23775        __struct.target_component = buf.get_u8();
23776        for v in &mut __struct.param_id {
23777            let val = buf.get_u8();
23778            *v = val;
23779        }
23780        Ok(__struct)
23781    }
23782    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23783        let mut __tmp = BytesMut::new(bytes);
23784        #[allow(clippy::absurd_extreme_comparisons)]
23785        #[allow(unused_comparisons)]
23786        if __tmp.remaining() < Self::ENCODED_LEN {
23787            panic!(
23788                "buffer is too small (need {} bytes, but got {})",
23789                Self::ENCODED_LEN,
23790                __tmp.remaining(),
23791            )
23792        }
23793        __tmp.put_i16_le(self.param_index);
23794        __tmp.put_u8(self.target_system);
23795        __tmp.put_u8(self.target_component);
23796        for val in &self.param_id {
23797            __tmp.put_u8(*val);
23798        }
23799        if matches!(version, MavlinkVersion::V2) {
23800            let len = __tmp.len();
23801            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23802        } else {
23803            __tmp.len()
23804        }
23805    }
23806}
23807#[doc = "Set a parameter value. In order to deal with message loss (and retransmission of PARAM_EXT_SET), when setting a parameter value and the new value is the same as the current value, you will immediately get a PARAM_ACK_ACCEPTED response. If the current state is PARAM_ACK_IN_PROGRESS, you will accordingly receive a PARAM_ACK_IN_PROGRESS in response."]
23808#[doc = ""]
23809#[doc = "ID: 323"]
23810#[derive(Debug, Clone, PartialEq)]
23811#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23812#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23813pub struct PARAM_EXT_SET_DATA {
23814    #[doc = "System ID"]
23815    pub target_system: u8,
23816    #[doc = "Component ID"]
23817    pub target_component: u8,
23818    #[doc = "Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
23819    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23820    pub param_id: [u8; 16],
23821    #[doc = "Parameter value"]
23822    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23823    pub param_value: [u8; 128],
23824    #[doc = "Parameter type."]
23825    pub param_type: MavParamExtType,
23826}
23827impl PARAM_EXT_SET_DATA {
23828    pub const ENCODED_LEN: usize = 147usize;
23829    pub const DEFAULT: Self = Self {
23830        target_system: 0_u8,
23831        target_component: 0_u8,
23832        param_id: [0_u8; 16usize],
23833        param_value: [0_u8; 128usize],
23834        param_type: MavParamExtType::DEFAULT,
23835    };
23836    #[cfg(feature = "arbitrary")]
23837    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23838        use arbitrary::{Arbitrary, Unstructured};
23839        let mut buf = [0u8; 1024];
23840        rng.fill_bytes(&mut buf);
23841        let mut unstructured = Unstructured::new(&buf);
23842        Self::arbitrary(&mut unstructured).unwrap_or_default()
23843    }
23844}
23845impl Default for PARAM_EXT_SET_DATA {
23846    fn default() -> Self {
23847        Self::DEFAULT.clone()
23848    }
23849}
23850impl MessageData for PARAM_EXT_SET_DATA {
23851    type Message = MavMessage;
23852    const ID: u32 = 323u32;
23853    const NAME: &'static str = "PARAM_EXT_SET";
23854    const EXTRA_CRC: u8 = 78u8;
23855    const ENCODED_LEN: usize = 147usize;
23856    fn deser(
23857        _version: MavlinkVersion,
23858        __input: &[u8],
23859    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23860        let avail_len = __input.len();
23861        let mut payload_buf = [0; Self::ENCODED_LEN];
23862        let mut buf = if avail_len < Self::ENCODED_LEN {
23863            payload_buf[0..avail_len].copy_from_slice(__input);
23864            Bytes::new(&payload_buf)
23865        } else {
23866            Bytes::new(__input)
23867        };
23868        let mut __struct = Self::default();
23869        __struct.target_system = buf.get_u8();
23870        __struct.target_component = buf.get_u8();
23871        for v in &mut __struct.param_id {
23872            let val = buf.get_u8();
23873            *v = val;
23874        }
23875        for v in &mut __struct.param_value {
23876            let val = buf.get_u8();
23877            *v = val;
23878        }
23879        let tmp = buf.get_u8();
23880        __struct.param_type =
23881            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23882                enum_type: "MavParamExtType",
23883                value: tmp as u32,
23884            })?;
23885        Ok(__struct)
23886    }
23887    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23888        let mut __tmp = BytesMut::new(bytes);
23889        #[allow(clippy::absurd_extreme_comparisons)]
23890        #[allow(unused_comparisons)]
23891        if __tmp.remaining() < Self::ENCODED_LEN {
23892            panic!(
23893                "buffer is too small (need {} bytes, but got {})",
23894                Self::ENCODED_LEN,
23895                __tmp.remaining(),
23896            )
23897        }
23898        __tmp.put_u8(self.target_system);
23899        __tmp.put_u8(self.target_component);
23900        for val in &self.param_id {
23901            __tmp.put_u8(*val);
23902        }
23903        for val in &self.param_value {
23904            __tmp.put_u8(*val);
23905        }
23906        __tmp.put_u8(self.param_type as u8);
23907        if matches!(version, MavlinkVersion::V2) {
23908            let len = __tmp.len();
23909            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23910        } else {
23911            __tmp.len()
23912        }
23913    }
23914}
23915#[doc = "Emit the value of a parameter. The inclusion of param_count and param_index in the message allows the recipient to keep track of received parameters and allows them to re-request missing parameters after a loss or timeout."]
23916#[doc = ""]
23917#[doc = "ID: 322"]
23918#[derive(Debug, Clone, PartialEq)]
23919#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23920#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23921pub struct PARAM_EXT_VALUE_DATA {
23922    #[doc = "Total number of parameters"]
23923    pub param_count: u16,
23924    #[doc = "Index of this parameter"]
23925    pub param_index: u16,
23926    #[doc = "Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
23927    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23928    pub param_id: [u8; 16],
23929    #[doc = "Parameter value"]
23930    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23931    pub param_value: [u8; 128],
23932    #[doc = "Parameter type."]
23933    pub param_type: MavParamExtType,
23934}
23935impl PARAM_EXT_VALUE_DATA {
23936    pub const ENCODED_LEN: usize = 149usize;
23937    pub const DEFAULT: Self = Self {
23938        param_count: 0_u16,
23939        param_index: 0_u16,
23940        param_id: [0_u8; 16usize],
23941        param_value: [0_u8; 128usize],
23942        param_type: MavParamExtType::DEFAULT,
23943    };
23944    #[cfg(feature = "arbitrary")]
23945    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23946        use arbitrary::{Arbitrary, Unstructured};
23947        let mut buf = [0u8; 1024];
23948        rng.fill_bytes(&mut buf);
23949        let mut unstructured = Unstructured::new(&buf);
23950        Self::arbitrary(&mut unstructured).unwrap_or_default()
23951    }
23952}
23953impl Default for PARAM_EXT_VALUE_DATA {
23954    fn default() -> Self {
23955        Self::DEFAULT.clone()
23956    }
23957}
23958impl MessageData for PARAM_EXT_VALUE_DATA {
23959    type Message = MavMessage;
23960    const ID: u32 = 322u32;
23961    const NAME: &'static str = "PARAM_EXT_VALUE";
23962    const EXTRA_CRC: u8 = 243u8;
23963    const ENCODED_LEN: usize = 149usize;
23964    fn deser(
23965        _version: MavlinkVersion,
23966        __input: &[u8],
23967    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23968        let avail_len = __input.len();
23969        let mut payload_buf = [0; Self::ENCODED_LEN];
23970        let mut buf = if avail_len < Self::ENCODED_LEN {
23971            payload_buf[0..avail_len].copy_from_slice(__input);
23972            Bytes::new(&payload_buf)
23973        } else {
23974            Bytes::new(__input)
23975        };
23976        let mut __struct = Self::default();
23977        __struct.param_count = buf.get_u16_le();
23978        __struct.param_index = buf.get_u16_le();
23979        for v in &mut __struct.param_id {
23980            let val = buf.get_u8();
23981            *v = val;
23982        }
23983        for v in &mut __struct.param_value {
23984            let val = buf.get_u8();
23985            *v = val;
23986        }
23987        let tmp = buf.get_u8();
23988        __struct.param_type =
23989            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23990                enum_type: "MavParamExtType",
23991                value: tmp as u32,
23992            })?;
23993        Ok(__struct)
23994    }
23995    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23996        let mut __tmp = BytesMut::new(bytes);
23997        #[allow(clippy::absurd_extreme_comparisons)]
23998        #[allow(unused_comparisons)]
23999        if __tmp.remaining() < Self::ENCODED_LEN {
24000            panic!(
24001                "buffer is too small (need {} bytes, but got {})",
24002                Self::ENCODED_LEN,
24003                __tmp.remaining(),
24004            )
24005        }
24006        __tmp.put_u16_le(self.param_count);
24007        __tmp.put_u16_le(self.param_index);
24008        for val in &self.param_id {
24009            __tmp.put_u8(*val);
24010        }
24011        for val in &self.param_value {
24012            __tmp.put_u8(*val);
24013        }
24014        __tmp.put_u8(self.param_type as u8);
24015        if matches!(version, MavlinkVersion::V2) {
24016            let len = __tmp.len();
24017            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24018        } else {
24019            __tmp.len()
24020        }
24021    }
24022}
24023#[doc = "Bind a RC channel to a parameter. The parameter should change according to the RC channel value."]
24024#[doc = ""]
24025#[doc = "ID: 50"]
24026#[derive(Debug, Clone, PartialEq)]
24027#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24028#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24029pub struct PARAM_MAP_RC_DATA {
24030    #[doc = "Initial parameter value"]
24031    pub param_value0: f32,
24032    #[doc = "Scale, maps the RC range [-1, 1] to a parameter value"]
24033    pub scale: f32,
24034    #[doc = "Minimum param value. The protocol does not define if this overwrites an onboard minimum value. (Depends on implementation)"]
24035    pub param_value_min: f32,
24036    #[doc = "Maximum param value. The protocol does not define if this overwrites an onboard maximum value. (Depends on implementation)"]
24037    pub param_value_max: f32,
24038    #[doc = "Parameter index. Send -1 to use the param ID field as identifier (else the param id will be ignored), send -2 to disable any existing map for this rc_channel_index."]
24039    pub param_index: i16,
24040    #[doc = "System ID"]
24041    pub target_system: u8,
24042    #[doc = "Component ID"]
24043    pub target_component: u8,
24044    #[doc = "Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
24045    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
24046    pub param_id: [u8; 16],
24047    #[doc = "Index of parameter RC channel. Not equal to the RC channel id. Typically corresponds to a potentiometer-knob on the RC."]
24048    pub parameter_rc_channel_index: u8,
24049}
24050impl PARAM_MAP_RC_DATA {
24051    pub const ENCODED_LEN: usize = 37usize;
24052    pub const DEFAULT: Self = Self {
24053        param_value0: 0.0_f32,
24054        scale: 0.0_f32,
24055        param_value_min: 0.0_f32,
24056        param_value_max: 0.0_f32,
24057        param_index: 0_i16,
24058        target_system: 0_u8,
24059        target_component: 0_u8,
24060        param_id: [0_u8; 16usize],
24061        parameter_rc_channel_index: 0_u8,
24062    };
24063    #[cfg(feature = "arbitrary")]
24064    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24065        use arbitrary::{Arbitrary, Unstructured};
24066        let mut buf = [0u8; 1024];
24067        rng.fill_bytes(&mut buf);
24068        let mut unstructured = Unstructured::new(&buf);
24069        Self::arbitrary(&mut unstructured).unwrap_or_default()
24070    }
24071}
24072impl Default for PARAM_MAP_RC_DATA {
24073    fn default() -> Self {
24074        Self::DEFAULT.clone()
24075    }
24076}
24077impl MessageData for PARAM_MAP_RC_DATA {
24078    type Message = MavMessage;
24079    const ID: u32 = 50u32;
24080    const NAME: &'static str = "PARAM_MAP_RC";
24081    const EXTRA_CRC: u8 = 78u8;
24082    const ENCODED_LEN: usize = 37usize;
24083    fn deser(
24084        _version: MavlinkVersion,
24085        __input: &[u8],
24086    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24087        let avail_len = __input.len();
24088        let mut payload_buf = [0; Self::ENCODED_LEN];
24089        let mut buf = if avail_len < Self::ENCODED_LEN {
24090            payload_buf[0..avail_len].copy_from_slice(__input);
24091            Bytes::new(&payload_buf)
24092        } else {
24093            Bytes::new(__input)
24094        };
24095        let mut __struct = Self::default();
24096        __struct.param_value0 = buf.get_f32_le();
24097        __struct.scale = buf.get_f32_le();
24098        __struct.param_value_min = buf.get_f32_le();
24099        __struct.param_value_max = buf.get_f32_le();
24100        __struct.param_index = buf.get_i16_le();
24101        __struct.target_system = buf.get_u8();
24102        __struct.target_component = buf.get_u8();
24103        for v in &mut __struct.param_id {
24104            let val = buf.get_u8();
24105            *v = val;
24106        }
24107        __struct.parameter_rc_channel_index = buf.get_u8();
24108        Ok(__struct)
24109    }
24110    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24111        let mut __tmp = BytesMut::new(bytes);
24112        #[allow(clippy::absurd_extreme_comparisons)]
24113        #[allow(unused_comparisons)]
24114        if __tmp.remaining() < Self::ENCODED_LEN {
24115            panic!(
24116                "buffer is too small (need {} bytes, but got {})",
24117                Self::ENCODED_LEN,
24118                __tmp.remaining(),
24119            )
24120        }
24121        __tmp.put_f32_le(self.param_value0);
24122        __tmp.put_f32_le(self.scale);
24123        __tmp.put_f32_le(self.param_value_min);
24124        __tmp.put_f32_le(self.param_value_max);
24125        __tmp.put_i16_le(self.param_index);
24126        __tmp.put_u8(self.target_system);
24127        __tmp.put_u8(self.target_component);
24128        for val in &self.param_id {
24129            __tmp.put_u8(*val);
24130        }
24131        __tmp.put_u8(self.parameter_rc_channel_index);
24132        if matches!(version, MavlinkVersion::V2) {
24133            let len = __tmp.len();
24134            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24135        } else {
24136            __tmp.len()
24137        }
24138    }
24139}
24140#[doc = "Request all parameters of this component. After this request, all parameters are emitted. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
24141#[doc = ""]
24142#[doc = "ID: 21"]
24143#[derive(Debug, Clone, PartialEq)]
24144#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24145#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24146pub struct PARAM_REQUEST_LIST_DATA {
24147    #[doc = "System ID"]
24148    pub target_system: u8,
24149    #[doc = "Component ID"]
24150    pub target_component: u8,
24151}
24152impl PARAM_REQUEST_LIST_DATA {
24153    pub const ENCODED_LEN: usize = 2usize;
24154    pub const DEFAULT: Self = Self {
24155        target_system: 0_u8,
24156        target_component: 0_u8,
24157    };
24158    #[cfg(feature = "arbitrary")]
24159    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24160        use arbitrary::{Arbitrary, Unstructured};
24161        let mut buf = [0u8; 1024];
24162        rng.fill_bytes(&mut buf);
24163        let mut unstructured = Unstructured::new(&buf);
24164        Self::arbitrary(&mut unstructured).unwrap_or_default()
24165    }
24166}
24167impl Default for PARAM_REQUEST_LIST_DATA {
24168    fn default() -> Self {
24169        Self::DEFAULT.clone()
24170    }
24171}
24172impl MessageData for PARAM_REQUEST_LIST_DATA {
24173    type Message = MavMessage;
24174    const ID: u32 = 21u32;
24175    const NAME: &'static str = "PARAM_REQUEST_LIST";
24176    const EXTRA_CRC: u8 = 159u8;
24177    const ENCODED_LEN: usize = 2usize;
24178    fn deser(
24179        _version: MavlinkVersion,
24180        __input: &[u8],
24181    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24182        let avail_len = __input.len();
24183        let mut payload_buf = [0; Self::ENCODED_LEN];
24184        let mut buf = if avail_len < Self::ENCODED_LEN {
24185            payload_buf[0..avail_len].copy_from_slice(__input);
24186            Bytes::new(&payload_buf)
24187        } else {
24188            Bytes::new(__input)
24189        };
24190        let mut __struct = Self::default();
24191        __struct.target_system = buf.get_u8();
24192        __struct.target_component = buf.get_u8();
24193        Ok(__struct)
24194    }
24195    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24196        let mut __tmp = BytesMut::new(bytes);
24197        #[allow(clippy::absurd_extreme_comparisons)]
24198        #[allow(unused_comparisons)]
24199        if __tmp.remaining() < Self::ENCODED_LEN {
24200            panic!(
24201                "buffer is too small (need {} bytes, but got {})",
24202                Self::ENCODED_LEN,
24203                __tmp.remaining(),
24204            )
24205        }
24206        __tmp.put_u8(self.target_system);
24207        __tmp.put_u8(self.target_component);
24208        if matches!(version, MavlinkVersion::V2) {
24209            let len = __tmp.len();
24210            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24211        } else {
24212            __tmp.len()
24213        }
24214    }
24215}
24216#[doc = "value[float]. This allows to send a parameter to any other component (such as the GCS) without the need of previous knowledge of possible parameter names. Thus the same GCS can store different parameters for different autopilots. See also <https://mavlink.io/en/services/parameter.html> for a full documentation of QGroundControl and IMU code."]
24217#[doc = ""]
24218#[doc = "ID: 20"]
24219#[derive(Debug, Clone, PartialEq)]
24220#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24221#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24222pub struct PARAM_REQUEST_READ_DATA {
24223    #[doc = "Parameter index. Send -1 to use the param ID field as identifier (else the param id will be ignored)"]
24224    pub param_index: i16,
24225    #[doc = "System ID"]
24226    pub target_system: u8,
24227    #[doc = "Component ID"]
24228    pub target_component: u8,
24229    #[doc = "Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
24230    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
24231    pub param_id: [u8; 16],
24232}
24233impl PARAM_REQUEST_READ_DATA {
24234    pub const ENCODED_LEN: usize = 20usize;
24235    pub const DEFAULT: Self = Self {
24236        param_index: 0_i16,
24237        target_system: 0_u8,
24238        target_component: 0_u8,
24239        param_id: [0_u8; 16usize],
24240    };
24241    #[cfg(feature = "arbitrary")]
24242    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24243        use arbitrary::{Arbitrary, Unstructured};
24244        let mut buf = [0u8; 1024];
24245        rng.fill_bytes(&mut buf);
24246        let mut unstructured = Unstructured::new(&buf);
24247        Self::arbitrary(&mut unstructured).unwrap_or_default()
24248    }
24249}
24250impl Default for PARAM_REQUEST_READ_DATA {
24251    fn default() -> Self {
24252        Self::DEFAULT.clone()
24253    }
24254}
24255impl MessageData for PARAM_REQUEST_READ_DATA {
24256    type Message = MavMessage;
24257    const ID: u32 = 20u32;
24258    const NAME: &'static str = "PARAM_REQUEST_READ";
24259    const EXTRA_CRC: u8 = 214u8;
24260    const ENCODED_LEN: usize = 20usize;
24261    fn deser(
24262        _version: MavlinkVersion,
24263        __input: &[u8],
24264    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24265        let avail_len = __input.len();
24266        let mut payload_buf = [0; Self::ENCODED_LEN];
24267        let mut buf = if avail_len < Self::ENCODED_LEN {
24268            payload_buf[0..avail_len].copy_from_slice(__input);
24269            Bytes::new(&payload_buf)
24270        } else {
24271            Bytes::new(__input)
24272        };
24273        let mut __struct = Self::default();
24274        __struct.param_index = buf.get_i16_le();
24275        __struct.target_system = buf.get_u8();
24276        __struct.target_component = buf.get_u8();
24277        for v in &mut __struct.param_id {
24278            let val = buf.get_u8();
24279            *v = val;
24280        }
24281        Ok(__struct)
24282    }
24283    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24284        let mut __tmp = BytesMut::new(bytes);
24285        #[allow(clippy::absurd_extreme_comparisons)]
24286        #[allow(unused_comparisons)]
24287        if __tmp.remaining() < Self::ENCODED_LEN {
24288            panic!(
24289                "buffer is too small (need {} bytes, but got {})",
24290                Self::ENCODED_LEN,
24291                __tmp.remaining(),
24292            )
24293        }
24294        __tmp.put_i16_le(self.param_index);
24295        __tmp.put_u8(self.target_system);
24296        __tmp.put_u8(self.target_component);
24297        for val in &self.param_id {
24298            __tmp.put_u8(*val);
24299        }
24300        if matches!(version, MavlinkVersion::V2) {
24301            let len = __tmp.len();
24302            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24303        } else {
24304            __tmp.len()
24305        }
24306    }
24307}
24308#[doc = "Set a parameter value (write new value to permanent storage).         The receiving component should acknowledge the new parameter value by broadcasting a PARAM_VALUE message (broadcasting ensures that multiple GCS all have an up-to-date list of all parameters). If the sending GCS did not receive a PARAM_VALUE within its timeout time, it should re-send the PARAM_SET message. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
24309#[doc = ""]
24310#[doc = "ID: 23"]
24311#[derive(Debug, Clone, PartialEq)]
24312#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24313#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24314pub struct PARAM_SET_DATA {
24315    #[doc = "Onboard parameter value"]
24316    pub param_value: f32,
24317    #[doc = "System ID"]
24318    pub target_system: u8,
24319    #[doc = "Component ID"]
24320    pub target_component: u8,
24321    #[doc = "Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
24322    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
24323    pub param_id: [u8; 16],
24324    #[doc = "Onboard parameter type."]
24325    pub param_type: MavParamType,
24326}
24327impl PARAM_SET_DATA {
24328    pub const ENCODED_LEN: usize = 23usize;
24329    pub const DEFAULT: Self = Self {
24330        param_value: 0.0_f32,
24331        target_system: 0_u8,
24332        target_component: 0_u8,
24333        param_id: [0_u8; 16usize],
24334        param_type: MavParamType::DEFAULT,
24335    };
24336    #[cfg(feature = "arbitrary")]
24337    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24338        use arbitrary::{Arbitrary, Unstructured};
24339        let mut buf = [0u8; 1024];
24340        rng.fill_bytes(&mut buf);
24341        let mut unstructured = Unstructured::new(&buf);
24342        Self::arbitrary(&mut unstructured).unwrap_or_default()
24343    }
24344}
24345impl Default for PARAM_SET_DATA {
24346    fn default() -> Self {
24347        Self::DEFAULT.clone()
24348    }
24349}
24350impl MessageData for PARAM_SET_DATA {
24351    type Message = MavMessage;
24352    const ID: u32 = 23u32;
24353    const NAME: &'static str = "PARAM_SET";
24354    const EXTRA_CRC: u8 = 168u8;
24355    const ENCODED_LEN: usize = 23usize;
24356    fn deser(
24357        _version: MavlinkVersion,
24358        __input: &[u8],
24359    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24360        let avail_len = __input.len();
24361        let mut payload_buf = [0; Self::ENCODED_LEN];
24362        let mut buf = if avail_len < Self::ENCODED_LEN {
24363            payload_buf[0..avail_len].copy_from_slice(__input);
24364            Bytes::new(&payload_buf)
24365        } else {
24366            Bytes::new(__input)
24367        };
24368        let mut __struct = Self::default();
24369        __struct.param_value = buf.get_f32_le();
24370        __struct.target_system = buf.get_u8();
24371        __struct.target_component = buf.get_u8();
24372        for v in &mut __struct.param_id {
24373            let val = buf.get_u8();
24374            *v = val;
24375        }
24376        let tmp = buf.get_u8();
24377        __struct.param_type =
24378            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24379                enum_type: "MavParamType",
24380                value: tmp as u32,
24381            })?;
24382        Ok(__struct)
24383    }
24384    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24385        let mut __tmp = BytesMut::new(bytes);
24386        #[allow(clippy::absurd_extreme_comparisons)]
24387        #[allow(unused_comparisons)]
24388        if __tmp.remaining() < Self::ENCODED_LEN {
24389            panic!(
24390                "buffer is too small (need {} bytes, but got {})",
24391                Self::ENCODED_LEN,
24392                __tmp.remaining(),
24393            )
24394        }
24395        __tmp.put_f32_le(self.param_value);
24396        __tmp.put_u8(self.target_system);
24397        __tmp.put_u8(self.target_component);
24398        for val in &self.param_id {
24399            __tmp.put_u8(*val);
24400        }
24401        __tmp.put_u8(self.param_type as u8);
24402        if matches!(version, MavlinkVersion::V2) {
24403            let len = __tmp.len();
24404            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24405        } else {
24406            __tmp.len()
24407        }
24408    }
24409}
24410#[doc = "Emit the value of a onboard parameter. The inclusion of param_count and param_index in the message allows the recipient to keep track of received parameters and allows him to re-request missing parameters after a loss or timeout. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
24411#[doc = ""]
24412#[doc = "ID: 22"]
24413#[derive(Debug, Clone, PartialEq)]
24414#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24415#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24416pub struct PARAM_VALUE_DATA {
24417    #[doc = "Onboard parameter value"]
24418    pub param_value: f32,
24419    #[doc = "Total number of onboard parameters"]
24420    pub param_count: u16,
24421    #[doc = "Index of this onboard parameter"]
24422    pub param_index: u16,
24423    #[doc = "Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
24424    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
24425    pub param_id: [u8; 16],
24426    #[doc = "Onboard parameter type."]
24427    pub param_type: MavParamType,
24428}
24429impl PARAM_VALUE_DATA {
24430    pub const ENCODED_LEN: usize = 25usize;
24431    pub const DEFAULT: Self = Self {
24432        param_value: 0.0_f32,
24433        param_count: 0_u16,
24434        param_index: 0_u16,
24435        param_id: [0_u8; 16usize],
24436        param_type: MavParamType::DEFAULT,
24437    };
24438    #[cfg(feature = "arbitrary")]
24439    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24440        use arbitrary::{Arbitrary, Unstructured};
24441        let mut buf = [0u8; 1024];
24442        rng.fill_bytes(&mut buf);
24443        let mut unstructured = Unstructured::new(&buf);
24444        Self::arbitrary(&mut unstructured).unwrap_or_default()
24445    }
24446}
24447impl Default for PARAM_VALUE_DATA {
24448    fn default() -> Self {
24449        Self::DEFAULT.clone()
24450    }
24451}
24452impl MessageData for PARAM_VALUE_DATA {
24453    type Message = MavMessage;
24454    const ID: u32 = 22u32;
24455    const NAME: &'static str = "PARAM_VALUE";
24456    const EXTRA_CRC: u8 = 220u8;
24457    const ENCODED_LEN: usize = 25usize;
24458    fn deser(
24459        _version: MavlinkVersion,
24460        __input: &[u8],
24461    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24462        let avail_len = __input.len();
24463        let mut payload_buf = [0; Self::ENCODED_LEN];
24464        let mut buf = if avail_len < Self::ENCODED_LEN {
24465            payload_buf[0..avail_len].copy_from_slice(__input);
24466            Bytes::new(&payload_buf)
24467        } else {
24468            Bytes::new(__input)
24469        };
24470        let mut __struct = Self::default();
24471        __struct.param_value = buf.get_f32_le();
24472        __struct.param_count = buf.get_u16_le();
24473        __struct.param_index = buf.get_u16_le();
24474        for v in &mut __struct.param_id {
24475            let val = buf.get_u8();
24476            *v = val;
24477        }
24478        let tmp = buf.get_u8();
24479        __struct.param_type =
24480            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24481                enum_type: "MavParamType",
24482                value: tmp as u32,
24483            })?;
24484        Ok(__struct)
24485    }
24486    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24487        let mut __tmp = BytesMut::new(bytes);
24488        #[allow(clippy::absurd_extreme_comparisons)]
24489        #[allow(unused_comparisons)]
24490        if __tmp.remaining() < Self::ENCODED_LEN {
24491            panic!(
24492                "buffer is too small (need {} bytes, but got {})",
24493                Self::ENCODED_LEN,
24494                __tmp.remaining(),
24495            )
24496        }
24497        __tmp.put_f32_le(self.param_value);
24498        __tmp.put_u16_le(self.param_count);
24499        __tmp.put_u16_le(self.param_index);
24500        for val in &self.param_id {
24501            __tmp.put_u8(*val);
24502        }
24503        __tmp.put_u8(self.param_type as u8);
24504        if matches!(version, MavlinkVersion::V2) {
24505            let len = __tmp.len();
24506            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24507        } else {
24508            __tmp.len()
24509        }
24510    }
24511}
24512#[deprecated = "To be removed / merged with TIMESYNC. See `TIMESYNC` (Deprecated since 2011-08)"]
24513#[doc = "A ping message either requesting or responding to a ping. This allows to measure the system latencies, including serial port, radio modem and UDP connections. The ping microservice is documented at <https://mavlink.io/en/services/ping.html>."]
24514#[doc = ""]
24515#[doc = "ID: 4"]
24516#[derive(Debug, Clone, PartialEq)]
24517#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24518#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24519pub struct PING_DATA {
24520    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
24521    pub time_usec: u64,
24522    #[doc = "PING sequence"]
24523    pub seq: u32,
24524    #[doc = "0: request ping from all receiving systems. If greater than 0: message is a ping response and number is the system id of the requesting system"]
24525    pub target_system: u8,
24526    #[doc = "0: request ping from all receiving components. If greater than 0: message is a ping response and number is the component id of the requesting component."]
24527    pub target_component: u8,
24528}
24529impl PING_DATA {
24530    pub const ENCODED_LEN: usize = 14usize;
24531    pub const DEFAULT: Self = Self {
24532        time_usec: 0_u64,
24533        seq: 0_u32,
24534        target_system: 0_u8,
24535        target_component: 0_u8,
24536    };
24537    #[cfg(feature = "arbitrary")]
24538    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24539        use arbitrary::{Arbitrary, Unstructured};
24540        let mut buf = [0u8; 1024];
24541        rng.fill_bytes(&mut buf);
24542        let mut unstructured = Unstructured::new(&buf);
24543        Self::arbitrary(&mut unstructured).unwrap_or_default()
24544    }
24545}
24546impl Default for PING_DATA {
24547    fn default() -> Self {
24548        Self::DEFAULT.clone()
24549    }
24550}
24551impl MessageData for PING_DATA {
24552    type Message = MavMessage;
24553    const ID: u32 = 4u32;
24554    const NAME: &'static str = "PING";
24555    const EXTRA_CRC: u8 = 237u8;
24556    const ENCODED_LEN: usize = 14usize;
24557    fn deser(
24558        _version: MavlinkVersion,
24559        __input: &[u8],
24560    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24561        let avail_len = __input.len();
24562        let mut payload_buf = [0; Self::ENCODED_LEN];
24563        let mut buf = if avail_len < Self::ENCODED_LEN {
24564            payload_buf[0..avail_len].copy_from_slice(__input);
24565            Bytes::new(&payload_buf)
24566        } else {
24567            Bytes::new(__input)
24568        };
24569        let mut __struct = Self::default();
24570        __struct.time_usec = buf.get_u64_le();
24571        __struct.seq = buf.get_u32_le();
24572        __struct.target_system = buf.get_u8();
24573        __struct.target_component = buf.get_u8();
24574        Ok(__struct)
24575    }
24576    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24577        let mut __tmp = BytesMut::new(bytes);
24578        #[allow(clippy::absurd_extreme_comparisons)]
24579        #[allow(unused_comparisons)]
24580        if __tmp.remaining() < Self::ENCODED_LEN {
24581            panic!(
24582                "buffer is too small (need {} bytes, but got {})",
24583                Self::ENCODED_LEN,
24584                __tmp.remaining(),
24585            )
24586        }
24587        __tmp.put_u64_le(self.time_usec);
24588        __tmp.put_u32_le(self.seq);
24589        __tmp.put_u8(self.target_system);
24590        __tmp.put_u8(self.target_component);
24591        if matches!(version, MavlinkVersion::V2) {
24592            let len = __tmp.len();
24593            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24594        } else {
24595            __tmp.len()
24596        }
24597    }
24598}
24599#[deprecated = "New version explicitly defines format. More interoperable. See `PLAY_TUNE_V2` (Deprecated since 2019-10)"]
24600#[doc = "Control vehicle tone generation (buzzer)."]
24601#[doc = ""]
24602#[doc = "ID: 258"]
24603#[derive(Debug, Clone, PartialEq)]
24604#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24605#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24606pub struct PLAY_TUNE_DATA {
24607    #[doc = "System ID"]
24608    pub target_system: u8,
24609    #[doc = "Component ID"]
24610    pub target_component: u8,
24611    #[doc = "tune in board specific format"]
24612    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
24613    pub tune: [u8; 30],
24614    #[doc = "tune extension (appended to tune)"]
24615    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
24616    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
24617    pub tune2: [u8; 200],
24618}
24619impl PLAY_TUNE_DATA {
24620    pub const ENCODED_LEN: usize = 232usize;
24621    pub const DEFAULT: Self = Self {
24622        target_system: 0_u8,
24623        target_component: 0_u8,
24624        tune: [0_u8; 30usize],
24625        tune2: [0_u8; 200usize],
24626    };
24627    #[cfg(feature = "arbitrary")]
24628    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24629        use arbitrary::{Arbitrary, Unstructured};
24630        let mut buf = [0u8; 1024];
24631        rng.fill_bytes(&mut buf);
24632        let mut unstructured = Unstructured::new(&buf);
24633        Self::arbitrary(&mut unstructured).unwrap_or_default()
24634    }
24635}
24636impl Default for PLAY_TUNE_DATA {
24637    fn default() -> Self {
24638        Self::DEFAULT.clone()
24639    }
24640}
24641impl MessageData for PLAY_TUNE_DATA {
24642    type Message = MavMessage;
24643    const ID: u32 = 258u32;
24644    const NAME: &'static str = "PLAY_TUNE";
24645    const EXTRA_CRC: u8 = 187u8;
24646    const ENCODED_LEN: usize = 232usize;
24647    fn deser(
24648        _version: MavlinkVersion,
24649        __input: &[u8],
24650    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24651        let avail_len = __input.len();
24652        let mut payload_buf = [0; Self::ENCODED_LEN];
24653        let mut buf = if avail_len < Self::ENCODED_LEN {
24654            payload_buf[0..avail_len].copy_from_slice(__input);
24655            Bytes::new(&payload_buf)
24656        } else {
24657            Bytes::new(__input)
24658        };
24659        let mut __struct = Self::default();
24660        __struct.target_system = buf.get_u8();
24661        __struct.target_component = buf.get_u8();
24662        for v in &mut __struct.tune {
24663            let val = buf.get_u8();
24664            *v = val;
24665        }
24666        for v in &mut __struct.tune2 {
24667            let val = buf.get_u8();
24668            *v = val;
24669        }
24670        Ok(__struct)
24671    }
24672    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24673        let mut __tmp = BytesMut::new(bytes);
24674        #[allow(clippy::absurd_extreme_comparisons)]
24675        #[allow(unused_comparisons)]
24676        if __tmp.remaining() < Self::ENCODED_LEN {
24677            panic!(
24678                "buffer is too small (need {} bytes, but got {})",
24679                Self::ENCODED_LEN,
24680                __tmp.remaining(),
24681            )
24682        }
24683        __tmp.put_u8(self.target_system);
24684        __tmp.put_u8(self.target_component);
24685        for val in &self.tune {
24686            __tmp.put_u8(*val);
24687        }
24688        if matches!(version, MavlinkVersion::V2) {
24689            for val in &self.tune2 {
24690                __tmp.put_u8(*val);
24691            }
24692            let len = __tmp.len();
24693            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24694        } else {
24695            __tmp.len()
24696        }
24697    }
24698}
24699#[doc = "Play vehicle tone/tune (buzzer). Supersedes message PLAY_TUNE."]
24700#[doc = ""]
24701#[doc = "ID: 400"]
24702#[derive(Debug, Clone, PartialEq)]
24703#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24704#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24705pub struct PLAY_TUNE_V2_DATA {
24706    #[doc = "Tune format"]
24707    pub format: TuneFormat,
24708    #[doc = "System ID"]
24709    pub target_system: u8,
24710    #[doc = "Component ID"]
24711    pub target_component: u8,
24712    #[doc = "Tune definition as a NULL-terminated string."]
24713    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
24714    pub tune: [u8; 248],
24715}
24716impl PLAY_TUNE_V2_DATA {
24717    pub const ENCODED_LEN: usize = 254usize;
24718    pub const DEFAULT: Self = Self {
24719        format: TuneFormat::DEFAULT,
24720        target_system: 0_u8,
24721        target_component: 0_u8,
24722        tune: [0_u8; 248usize],
24723    };
24724    #[cfg(feature = "arbitrary")]
24725    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24726        use arbitrary::{Arbitrary, Unstructured};
24727        let mut buf = [0u8; 1024];
24728        rng.fill_bytes(&mut buf);
24729        let mut unstructured = Unstructured::new(&buf);
24730        Self::arbitrary(&mut unstructured).unwrap_or_default()
24731    }
24732}
24733impl Default for PLAY_TUNE_V2_DATA {
24734    fn default() -> Self {
24735        Self::DEFAULT.clone()
24736    }
24737}
24738impl MessageData for PLAY_TUNE_V2_DATA {
24739    type Message = MavMessage;
24740    const ID: u32 = 400u32;
24741    const NAME: &'static str = "PLAY_TUNE_V2";
24742    const EXTRA_CRC: u8 = 110u8;
24743    const ENCODED_LEN: usize = 254usize;
24744    fn deser(
24745        _version: MavlinkVersion,
24746        __input: &[u8],
24747    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24748        let avail_len = __input.len();
24749        let mut payload_buf = [0; Self::ENCODED_LEN];
24750        let mut buf = if avail_len < Self::ENCODED_LEN {
24751            payload_buf[0..avail_len].copy_from_slice(__input);
24752            Bytes::new(&payload_buf)
24753        } else {
24754            Bytes::new(__input)
24755        };
24756        let mut __struct = Self::default();
24757        let tmp = buf.get_u32_le();
24758        __struct.format = FromPrimitive::from_u32(tmp).ok_or(
24759            ::mavlink_core::error::ParserError::InvalidEnum {
24760                enum_type: "TuneFormat",
24761                value: tmp as u32,
24762            },
24763        )?;
24764        __struct.target_system = buf.get_u8();
24765        __struct.target_component = buf.get_u8();
24766        for v in &mut __struct.tune {
24767            let val = buf.get_u8();
24768            *v = val;
24769        }
24770        Ok(__struct)
24771    }
24772    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24773        let mut __tmp = BytesMut::new(bytes);
24774        #[allow(clippy::absurd_extreme_comparisons)]
24775        #[allow(unused_comparisons)]
24776        if __tmp.remaining() < Self::ENCODED_LEN {
24777            panic!(
24778                "buffer is too small (need {} bytes, but got {})",
24779                Self::ENCODED_LEN,
24780                __tmp.remaining(),
24781            )
24782        }
24783        __tmp.put_u32_le(self.format as u32);
24784        __tmp.put_u8(self.target_system);
24785        __tmp.put_u8(self.target_component);
24786        for val in &self.tune {
24787            __tmp.put_u8(*val);
24788        }
24789        if matches!(version, MavlinkVersion::V2) {
24790            let len = __tmp.len();
24791            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24792        } else {
24793            __tmp.len()
24794        }
24795    }
24796}
24797#[doc = "Reports the current commanded vehicle position, velocity, and acceleration as specified by the autopilot. This should match the commands sent in SET_POSITION_TARGET_GLOBAL_INT if the vehicle is being controlled this way."]
24798#[doc = ""]
24799#[doc = "ID: 87"]
24800#[derive(Debug, Clone, PartialEq)]
24801#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24802#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24803pub struct POSITION_TARGET_GLOBAL_INT_DATA {
24804    #[doc = "Timestamp (time since system boot). The rationale for the timestamp in the setpoint is to allow the system to compensate for the transport delay of the setpoint. This allows the system to compensate processing latency."]
24805    pub time_boot_ms: u32,
24806    #[doc = "Latitude in WGS84 frame"]
24807    pub lat_int: i32,
24808    #[doc = "Longitude in WGS84 frame"]
24809    pub lon_int: i32,
24810    #[doc = "Altitude (MSL, AGL or relative to home altitude, depending on frame)"]
24811    pub alt: f32,
24812    #[doc = "X velocity in NED frame"]
24813    pub vx: f32,
24814    #[doc = "Y velocity in NED frame"]
24815    pub vy: f32,
24816    #[doc = "Z velocity in NED frame"]
24817    pub vz: f32,
24818    #[doc = "X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
24819    pub afx: f32,
24820    #[doc = "Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
24821    pub afy: f32,
24822    #[doc = "Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
24823    pub afz: f32,
24824    #[doc = "yaw setpoint"]
24825    pub yaw: f32,
24826    #[doc = "yaw rate setpoint"]
24827    pub yaw_rate: f32,
24828    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
24829    pub type_mask: PositionTargetTypemask,
24830    #[doc = "Valid options are: MAV_FRAME_GLOBAL = 0, MAV_FRAME_GLOBAL_RELATIVE_ALT = 3, MAV_FRAME_GLOBAL_TERRAIN_ALT = 10 (MAV_FRAME_GLOBAL_INT, MAV_FRAME_GLOBAL_RELATIVE_ALT_INT, MAV_FRAME_GLOBAL_TERRAIN_ALT_INT are allowed synonyms, but have been deprecated)"]
24831    pub coordinate_frame: MavFrame,
24832}
24833impl POSITION_TARGET_GLOBAL_INT_DATA {
24834    pub const ENCODED_LEN: usize = 51usize;
24835    pub const DEFAULT: Self = Self {
24836        time_boot_ms: 0_u32,
24837        lat_int: 0_i32,
24838        lon_int: 0_i32,
24839        alt: 0.0_f32,
24840        vx: 0.0_f32,
24841        vy: 0.0_f32,
24842        vz: 0.0_f32,
24843        afx: 0.0_f32,
24844        afy: 0.0_f32,
24845        afz: 0.0_f32,
24846        yaw: 0.0_f32,
24847        yaw_rate: 0.0_f32,
24848        type_mask: PositionTargetTypemask::DEFAULT,
24849        coordinate_frame: MavFrame::DEFAULT,
24850    };
24851    #[cfg(feature = "arbitrary")]
24852    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24853        use arbitrary::{Arbitrary, Unstructured};
24854        let mut buf = [0u8; 1024];
24855        rng.fill_bytes(&mut buf);
24856        let mut unstructured = Unstructured::new(&buf);
24857        Self::arbitrary(&mut unstructured).unwrap_or_default()
24858    }
24859}
24860impl Default for POSITION_TARGET_GLOBAL_INT_DATA {
24861    fn default() -> Self {
24862        Self::DEFAULT.clone()
24863    }
24864}
24865impl MessageData for POSITION_TARGET_GLOBAL_INT_DATA {
24866    type Message = MavMessage;
24867    const ID: u32 = 87u32;
24868    const NAME: &'static str = "POSITION_TARGET_GLOBAL_INT";
24869    const EXTRA_CRC: u8 = 150u8;
24870    const ENCODED_LEN: usize = 51usize;
24871    fn deser(
24872        _version: MavlinkVersion,
24873        __input: &[u8],
24874    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24875        let avail_len = __input.len();
24876        let mut payload_buf = [0; Self::ENCODED_LEN];
24877        let mut buf = if avail_len < Self::ENCODED_LEN {
24878            payload_buf[0..avail_len].copy_from_slice(__input);
24879            Bytes::new(&payload_buf)
24880        } else {
24881            Bytes::new(__input)
24882        };
24883        let mut __struct = Self::default();
24884        __struct.time_boot_ms = buf.get_u32_le();
24885        __struct.lat_int = buf.get_i32_le();
24886        __struct.lon_int = buf.get_i32_le();
24887        __struct.alt = buf.get_f32_le();
24888        __struct.vx = buf.get_f32_le();
24889        __struct.vy = buf.get_f32_le();
24890        __struct.vz = buf.get_f32_le();
24891        __struct.afx = buf.get_f32_le();
24892        __struct.afy = buf.get_f32_le();
24893        __struct.afz = buf.get_f32_le();
24894        __struct.yaw = buf.get_f32_le();
24895        __struct.yaw_rate = buf.get_f32_le();
24896        let tmp = buf.get_u16_le();
24897        __struct.type_mask = PositionTargetTypemask::from_bits(
24898            tmp & PositionTargetTypemask::all().bits(),
24899        )
24900        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
24901            flag_type: "PositionTargetTypemask",
24902            value: tmp as u32,
24903        })?;
24904        let tmp = buf.get_u8();
24905        __struct.coordinate_frame =
24906            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24907                enum_type: "MavFrame",
24908                value: tmp as u32,
24909            })?;
24910        Ok(__struct)
24911    }
24912    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24913        let mut __tmp = BytesMut::new(bytes);
24914        #[allow(clippy::absurd_extreme_comparisons)]
24915        #[allow(unused_comparisons)]
24916        if __tmp.remaining() < Self::ENCODED_LEN {
24917            panic!(
24918                "buffer is too small (need {} bytes, but got {})",
24919                Self::ENCODED_LEN,
24920                __tmp.remaining(),
24921            )
24922        }
24923        __tmp.put_u32_le(self.time_boot_ms);
24924        __tmp.put_i32_le(self.lat_int);
24925        __tmp.put_i32_le(self.lon_int);
24926        __tmp.put_f32_le(self.alt);
24927        __tmp.put_f32_le(self.vx);
24928        __tmp.put_f32_le(self.vy);
24929        __tmp.put_f32_le(self.vz);
24930        __tmp.put_f32_le(self.afx);
24931        __tmp.put_f32_le(self.afy);
24932        __tmp.put_f32_le(self.afz);
24933        __tmp.put_f32_le(self.yaw);
24934        __tmp.put_f32_le(self.yaw_rate);
24935        __tmp.put_u16_le(self.type_mask.bits());
24936        __tmp.put_u8(self.coordinate_frame as u8);
24937        if matches!(version, MavlinkVersion::V2) {
24938            let len = __tmp.len();
24939            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24940        } else {
24941            __tmp.len()
24942        }
24943    }
24944}
24945#[doc = "Reports the current commanded vehicle position, velocity, and acceleration as specified by the autopilot. This should match the commands sent in SET_POSITION_TARGET_LOCAL_NED if the vehicle is being controlled this way."]
24946#[doc = ""]
24947#[doc = "ID: 85"]
24948#[derive(Debug, Clone, PartialEq)]
24949#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24950#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24951pub struct POSITION_TARGET_LOCAL_NED_DATA {
24952    #[doc = "Timestamp (time since system boot)."]
24953    pub time_boot_ms: u32,
24954    #[doc = "X Position in NED frame"]
24955    pub x: f32,
24956    #[doc = "Y Position in NED frame"]
24957    pub y: f32,
24958    #[doc = "Z Position in NED frame (note, altitude is negative in NED)"]
24959    pub z: f32,
24960    #[doc = "X velocity in NED frame"]
24961    pub vx: f32,
24962    #[doc = "Y velocity in NED frame"]
24963    pub vy: f32,
24964    #[doc = "Z velocity in NED frame"]
24965    pub vz: f32,
24966    #[doc = "X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
24967    pub afx: f32,
24968    #[doc = "Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
24969    pub afy: f32,
24970    #[doc = "Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
24971    pub afz: f32,
24972    #[doc = "yaw setpoint"]
24973    pub yaw: f32,
24974    #[doc = "yaw rate setpoint"]
24975    pub yaw_rate: f32,
24976    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
24977    pub type_mask: PositionTargetTypemask,
24978    #[doc = "Valid options are: MAV_FRAME_LOCAL_NED = 1, MAV_FRAME_LOCAL_OFFSET_NED = 7, MAV_FRAME_BODY_NED = 8, MAV_FRAME_BODY_OFFSET_NED = 9"]
24979    pub coordinate_frame: MavFrame,
24980}
24981impl POSITION_TARGET_LOCAL_NED_DATA {
24982    pub const ENCODED_LEN: usize = 51usize;
24983    pub const DEFAULT: Self = Self {
24984        time_boot_ms: 0_u32,
24985        x: 0.0_f32,
24986        y: 0.0_f32,
24987        z: 0.0_f32,
24988        vx: 0.0_f32,
24989        vy: 0.0_f32,
24990        vz: 0.0_f32,
24991        afx: 0.0_f32,
24992        afy: 0.0_f32,
24993        afz: 0.0_f32,
24994        yaw: 0.0_f32,
24995        yaw_rate: 0.0_f32,
24996        type_mask: PositionTargetTypemask::DEFAULT,
24997        coordinate_frame: MavFrame::DEFAULT,
24998    };
24999    #[cfg(feature = "arbitrary")]
25000    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25001        use arbitrary::{Arbitrary, Unstructured};
25002        let mut buf = [0u8; 1024];
25003        rng.fill_bytes(&mut buf);
25004        let mut unstructured = Unstructured::new(&buf);
25005        Self::arbitrary(&mut unstructured).unwrap_or_default()
25006    }
25007}
25008impl Default for POSITION_TARGET_LOCAL_NED_DATA {
25009    fn default() -> Self {
25010        Self::DEFAULT.clone()
25011    }
25012}
25013impl MessageData for POSITION_TARGET_LOCAL_NED_DATA {
25014    type Message = MavMessage;
25015    const ID: u32 = 85u32;
25016    const NAME: &'static str = "POSITION_TARGET_LOCAL_NED";
25017    const EXTRA_CRC: u8 = 140u8;
25018    const ENCODED_LEN: usize = 51usize;
25019    fn deser(
25020        _version: MavlinkVersion,
25021        __input: &[u8],
25022    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25023        let avail_len = __input.len();
25024        let mut payload_buf = [0; Self::ENCODED_LEN];
25025        let mut buf = if avail_len < Self::ENCODED_LEN {
25026            payload_buf[0..avail_len].copy_from_slice(__input);
25027            Bytes::new(&payload_buf)
25028        } else {
25029            Bytes::new(__input)
25030        };
25031        let mut __struct = Self::default();
25032        __struct.time_boot_ms = buf.get_u32_le();
25033        __struct.x = buf.get_f32_le();
25034        __struct.y = buf.get_f32_le();
25035        __struct.z = buf.get_f32_le();
25036        __struct.vx = buf.get_f32_le();
25037        __struct.vy = buf.get_f32_le();
25038        __struct.vz = buf.get_f32_le();
25039        __struct.afx = buf.get_f32_le();
25040        __struct.afy = buf.get_f32_le();
25041        __struct.afz = buf.get_f32_le();
25042        __struct.yaw = buf.get_f32_le();
25043        __struct.yaw_rate = buf.get_f32_le();
25044        let tmp = buf.get_u16_le();
25045        __struct.type_mask = PositionTargetTypemask::from_bits(
25046            tmp & PositionTargetTypemask::all().bits(),
25047        )
25048        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
25049            flag_type: "PositionTargetTypemask",
25050            value: tmp as u32,
25051        })?;
25052        let tmp = buf.get_u8();
25053        __struct.coordinate_frame =
25054            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
25055                enum_type: "MavFrame",
25056                value: tmp as u32,
25057            })?;
25058        Ok(__struct)
25059    }
25060    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25061        let mut __tmp = BytesMut::new(bytes);
25062        #[allow(clippy::absurd_extreme_comparisons)]
25063        #[allow(unused_comparisons)]
25064        if __tmp.remaining() < Self::ENCODED_LEN {
25065            panic!(
25066                "buffer is too small (need {} bytes, but got {})",
25067                Self::ENCODED_LEN,
25068                __tmp.remaining(),
25069            )
25070        }
25071        __tmp.put_u32_le(self.time_boot_ms);
25072        __tmp.put_f32_le(self.x);
25073        __tmp.put_f32_le(self.y);
25074        __tmp.put_f32_le(self.z);
25075        __tmp.put_f32_le(self.vx);
25076        __tmp.put_f32_le(self.vy);
25077        __tmp.put_f32_le(self.vz);
25078        __tmp.put_f32_le(self.afx);
25079        __tmp.put_f32_le(self.afy);
25080        __tmp.put_f32_le(self.afz);
25081        __tmp.put_f32_le(self.yaw);
25082        __tmp.put_f32_le(self.yaw_rate);
25083        __tmp.put_u16_le(self.type_mask.bits());
25084        __tmp.put_u8(self.coordinate_frame as u8);
25085        if matches!(version, MavlinkVersion::V2) {
25086            let len = __tmp.len();
25087            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25088        } else {
25089            __tmp.len()
25090        }
25091    }
25092}
25093#[doc = "Power supply status."]
25094#[doc = ""]
25095#[doc = "ID: 125"]
25096#[derive(Debug, Clone, PartialEq)]
25097#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25098#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25099pub struct POWER_STATUS_DATA {
25100    #[doc = "5V rail voltage."]
25101    pub Vcc: u16,
25102    #[doc = "Servo rail voltage."]
25103    pub Vservo: u16,
25104    #[doc = "Bitmap of power supply status flags."]
25105    pub flags: MavPowerStatus,
25106}
25107impl POWER_STATUS_DATA {
25108    pub const ENCODED_LEN: usize = 6usize;
25109    pub const DEFAULT: Self = Self {
25110        Vcc: 0_u16,
25111        Vservo: 0_u16,
25112        flags: MavPowerStatus::DEFAULT,
25113    };
25114    #[cfg(feature = "arbitrary")]
25115    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25116        use arbitrary::{Arbitrary, Unstructured};
25117        let mut buf = [0u8; 1024];
25118        rng.fill_bytes(&mut buf);
25119        let mut unstructured = Unstructured::new(&buf);
25120        Self::arbitrary(&mut unstructured).unwrap_or_default()
25121    }
25122}
25123impl Default for POWER_STATUS_DATA {
25124    fn default() -> Self {
25125        Self::DEFAULT.clone()
25126    }
25127}
25128impl MessageData for POWER_STATUS_DATA {
25129    type Message = MavMessage;
25130    const ID: u32 = 125u32;
25131    const NAME: &'static str = "POWER_STATUS";
25132    const EXTRA_CRC: u8 = 203u8;
25133    const ENCODED_LEN: usize = 6usize;
25134    fn deser(
25135        _version: MavlinkVersion,
25136        __input: &[u8],
25137    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25138        let avail_len = __input.len();
25139        let mut payload_buf = [0; Self::ENCODED_LEN];
25140        let mut buf = if avail_len < Self::ENCODED_LEN {
25141            payload_buf[0..avail_len].copy_from_slice(__input);
25142            Bytes::new(&payload_buf)
25143        } else {
25144            Bytes::new(__input)
25145        };
25146        let mut __struct = Self::default();
25147        __struct.Vcc = buf.get_u16_le();
25148        __struct.Vservo = buf.get_u16_le();
25149        let tmp = buf.get_u16_le();
25150        __struct.flags = MavPowerStatus::from_bits(tmp & MavPowerStatus::all().bits()).ok_or(
25151            ::mavlink_core::error::ParserError::InvalidFlag {
25152                flag_type: "MavPowerStatus",
25153                value: tmp as u32,
25154            },
25155        )?;
25156        Ok(__struct)
25157    }
25158    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25159        let mut __tmp = BytesMut::new(bytes);
25160        #[allow(clippy::absurd_extreme_comparisons)]
25161        #[allow(unused_comparisons)]
25162        if __tmp.remaining() < Self::ENCODED_LEN {
25163            panic!(
25164                "buffer is too small (need {} bytes, but got {})",
25165                Self::ENCODED_LEN,
25166                __tmp.remaining(),
25167            )
25168        }
25169        __tmp.put_u16_le(self.Vcc);
25170        __tmp.put_u16_le(self.Vservo);
25171        __tmp.put_u16_le(self.flags.bits());
25172        if matches!(version, MavlinkVersion::V2) {
25173            let len = __tmp.len();
25174            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25175        } else {
25176            __tmp.len()
25177        }
25178    }
25179}
25180#[doc = "Version and capability of protocol version. This message can be requested with MAV_CMD_REQUEST_MESSAGE and is used as part of the handshaking to establish which MAVLink version should be used on the network. Every node should respond to a request for PROTOCOL_VERSION to enable the handshaking. Library implementers should consider adding this into the default decoding state machine to allow the protocol core to respond directly."]
25181#[doc = ""]
25182#[doc = "ID: 300"]
25183#[derive(Debug, Clone, PartialEq)]
25184#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25185#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25186pub struct PROTOCOL_VERSION_DATA {
25187    #[doc = "Currently active MAVLink version number * 100: v1.0 is 100, v2.0 is 200, etc."]
25188    pub version: u16,
25189    #[doc = "Minimum MAVLink version supported"]
25190    pub min_version: u16,
25191    #[doc = "Maximum MAVLink version supported (set to the same value as version by default)"]
25192    pub max_version: u16,
25193    #[doc = "The first 8 bytes (not characters printed in hex!) of the git hash."]
25194    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
25195    pub spec_version_hash: [u8; 8],
25196    #[doc = "The first 8 bytes (not characters printed in hex!) of the git hash."]
25197    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
25198    pub library_version_hash: [u8; 8],
25199}
25200impl PROTOCOL_VERSION_DATA {
25201    pub const ENCODED_LEN: usize = 22usize;
25202    pub const DEFAULT: Self = Self {
25203        version: 0_u16,
25204        min_version: 0_u16,
25205        max_version: 0_u16,
25206        spec_version_hash: [0_u8; 8usize],
25207        library_version_hash: [0_u8; 8usize],
25208    };
25209    #[cfg(feature = "arbitrary")]
25210    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25211        use arbitrary::{Arbitrary, Unstructured};
25212        let mut buf = [0u8; 1024];
25213        rng.fill_bytes(&mut buf);
25214        let mut unstructured = Unstructured::new(&buf);
25215        Self::arbitrary(&mut unstructured).unwrap_or_default()
25216    }
25217}
25218impl Default for PROTOCOL_VERSION_DATA {
25219    fn default() -> Self {
25220        Self::DEFAULT.clone()
25221    }
25222}
25223impl MessageData for PROTOCOL_VERSION_DATA {
25224    type Message = MavMessage;
25225    const ID: u32 = 300u32;
25226    const NAME: &'static str = "PROTOCOL_VERSION";
25227    const EXTRA_CRC: u8 = 217u8;
25228    const ENCODED_LEN: usize = 22usize;
25229    fn deser(
25230        _version: MavlinkVersion,
25231        __input: &[u8],
25232    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25233        let avail_len = __input.len();
25234        let mut payload_buf = [0; Self::ENCODED_LEN];
25235        let mut buf = if avail_len < Self::ENCODED_LEN {
25236            payload_buf[0..avail_len].copy_from_slice(__input);
25237            Bytes::new(&payload_buf)
25238        } else {
25239            Bytes::new(__input)
25240        };
25241        let mut __struct = Self::default();
25242        __struct.version = buf.get_u16_le();
25243        __struct.min_version = buf.get_u16_le();
25244        __struct.max_version = buf.get_u16_le();
25245        for v in &mut __struct.spec_version_hash {
25246            let val = buf.get_u8();
25247            *v = val;
25248        }
25249        for v in &mut __struct.library_version_hash {
25250            let val = buf.get_u8();
25251            *v = val;
25252        }
25253        Ok(__struct)
25254    }
25255    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25256        let mut __tmp = BytesMut::new(bytes);
25257        #[allow(clippy::absurd_extreme_comparisons)]
25258        #[allow(unused_comparisons)]
25259        if __tmp.remaining() < Self::ENCODED_LEN {
25260            panic!(
25261                "buffer is too small (need {} bytes, but got {})",
25262                Self::ENCODED_LEN,
25263                __tmp.remaining(),
25264            )
25265        }
25266        __tmp.put_u16_le(self.version);
25267        __tmp.put_u16_le(self.min_version);
25268        __tmp.put_u16_le(self.max_version);
25269        for val in &self.spec_version_hash {
25270            __tmp.put_u8(*val);
25271        }
25272        for val in &self.library_version_hash {
25273            __tmp.put_u8(*val);
25274        }
25275        if matches!(version, MavlinkVersion::V2) {
25276            let len = __tmp.len();
25277            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25278        } else {
25279            __tmp.len()
25280        }
25281    }
25282}
25283#[doc = "Status generated by radio and injected into MAVLink stream."]
25284#[doc = ""]
25285#[doc = "ID: 109"]
25286#[derive(Debug, Clone, PartialEq)]
25287#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25288#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25289pub struct RADIO_STATUS_DATA {
25290    #[doc = "Count of radio packet receive errors (since boot)."]
25291    pub rxerrors: u16,
25292    #[doc = "Count of error corrected radio packets (since boot)."]
25293    pub fixed: u16,
25294    #[doc = "Local (message sender) received signal strength indication in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
25295    pub rssi: u8,
25296    #[doc = "Remote (message receiver) signal strength indication in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
25297    pub remrssi: u8,
25298    #[doc = "Remaining free transmitter buffer space."]
25299    pub txbuf: u8,
25300    #[doc = "Local background noise level. These are device dependent RSSI values (scale as approx 2x dB on SiK radios). Values: [0-254], UINT8_MAX: invalid/unknown."]
25301    pub noise: u8,
25302    #[doc = "Remote background noise level. These are device dependent RSSI values (scale as approx 2x dB on SiK radios). Values: [0-254], UINT8_MAX: invalid/unknown."]
25303    pub remnoise: u8,
25304}
25305impl RADIO_STATUS_DATA {
25306    pub const ENCODED_LEN: usize = 9usize;
25307    pub const DEFAULT: Self = Self {
25308        rxerrors: 0_u16,
25309        fixed: 0_u16,
25310        rssi: 0_u8,
25311        remrssi: 0_u8,
25312        txbuf: 0_u8,
25313        noise: 0_u8,
25314        remnoise: 0_u8,
25315    };
25316    #[cfg(feature = "arbitrary")]
25317    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25318        use arbitrary::{Arbitrary, Unstructured};
25319        let mut buf = [0u8; 1024];
25320        rng.fill_bytes(&mut buf);
25321        let mut unstructured = Unstructured::new(&buf);
25322        Self::arbitrary(&mut unstructured).unwrap_or_default()
25323    }
25324}
25325impl Default for RADIO_STATUS_DATA {
25326    fn default() -> Self {
25327        Self::DEFAULT.clone()
25328    }
25329}
25330impl MessageData for RADIO_STATUS_DATA {
25331    type Message = MavMessage;
25332    const ID: u32 = 109u32;
25333    const NAME: &'static str = "RADIO_STATUS";
25334    const EXTRA_CRC: u8 = 185u8;
25335    const ENCODED_LEN: usize = 9usize;
25336    fn deser(
25337        _version: MavlinkVersion,
25338        __input: &[u8],
25339    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25340        let avail_len = __input.len();
25341        let mut payload_buf = [0; Self::ENCODED_LEN];
25342        let mut buf = if avail_len < Self::ENCODED_LEN {
25343            payload_buf[0..avail_len].copy_from_slice(__input);
25344            Bytes::new(&payload_buf)
25345        } else {
25346            Bytes::new(__input)
25347        };
25348        let mut __struct = Self::default();
25349        __struct.rxerrors = buf.get_u16_le();
25350        __struct.fixed = buf.get_u16_le();
25351        __struct.rssi = buf.get_u8();
25352        __struct.remrssi = buf.get_u8();
25353        __struct.txbuf = buf.get_u8();
25354        __struct.noise = buf.get_u8();
25355        __struct.remnoise = buf.get_u8();
25356        Ok(__struct)
25357    }
25358    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25359        let mut __tmp = BytesMut::new(bytes);
25360        #[allow(clippy::absurd_extreme_comparisons)]
25361        #[allow(unused_comparisons)]
25362        if __tmp.remaining() < Self::ENCODED_LEN {
25363            panic!(
25364                "buffer is too small (need {} bytes, but got {})",
25365                Self::ENCODED_LEN,
25366                __tmp.remaining(),
25367            )
25368        }
25369        __tmp.put_u16_le(self.rxerrors);
25370        __tmp.put_u16_le(self.fixed);
25371        __tmp.put_u8(self.rssi);
25372        __tmp.put_u8(self.remrssi);
25373        __tmp.put_u8(self.txbuf);
25374        __tmp.put_u8(self.noise);
25375        __tmp.put_u8(self.remnoise);
25376        if matches!(version, MavlinkVersion::V2) {
25377            let len = __tmp.len();
25378            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25379        } else {
25380            __tmp.len()
25381        }
25382    }
25383}
25384#[doc = "The RAW IMU readings for a 9DOF sensor, which is identified by the id (default IMU1). This message should always contain the true raw values without any scaling to allow data capture and system debugging."]
25385#[doc = ""]
25386#[doc = "ID: 27"]
25387#[derive(Debug, Clone, PartialEq)]
25388#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25389#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25390pub struct RAW_IMU_DATA {
25391    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
25392    pub time_usec: u64,
25393    #[doc = "X acceleration (raw)"]
25394    pub xacc: i16,
25395    #[doc = "Y acceleration (raw)"]
25396    pub yacc: i16,
25397    #[doc = "Z acceleration (raw)"]
25398    pub zacc: i16,
25399    #[doc = "Angular speed around X axis (raw)"]
25400    pub xgyro: i16,
25401    #[doc = "Angular speed around Y axis (raw)"]
25402    pub ygyro: i16,
25403    #[doc = "Angular speed around Z axis (raw)"]
25404    pub zgyro: i16,
25405    #[doc = "X Magnetic field (raw)"]
25406    pub xmag: i16,
25407    #[doc = "Y Magnetic field (raw)"]
25408    pub ymag: i16,
25409    #[doc = "Z Magnetic field (raw)"]
25410    pub zmag: i16,
25411    #[doc = "Id. Ids are numbered from 0 and map to IMUs numbered from 1 (e.g. IMU1 will have a message with id=0)"]
25412    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25413    pub id: u8,
25414    #[doc = "Temperature, 0: IMU does not provide temperature values. If the IMU is at 0C it must send 1 (0.01C)."]
25415    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25416    pub temperature: i16,
25417}
25418impl RAW_IMU_DATA {
25419    pub const ENCODED_LEN: usize = 29usize;
25420    pub const DEFAULT: Self = Self {
25421        time_usec: 0_u64,
25422        xacc: 0_i16,
25423        yacc: 0_i16,
25424        zacc: 0_i16,
25425        xgyro: 0_i16,
25426        ygyro: 0_i16,
25427        zgyro: 0_i16,
25428        xmag: 0_i16,
25429        ymag: 0_i16,
25430        zmag: 0_i16,
25431        id: 0_u8,
25432        temperature: 0_i16,
25433    };
25434    #[cfg(feature = "arbitrary")]
25435    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25436        use arbitrary::{Arbitrary, Unstructured};
25437        let mut buf = [0u8; 1024];
25438        rng.fill_bytes(&mut buf);
25439        let mut unstructured = Unstructured::new(&buf);
25440        Self::arbitrary(&mut unstructured).unwrap_or_default()
25441    }
25442}
25443impl Default for RAW_IMU_DATA {
25444    fn default() -> Self {
25445        Self::DEFAULT.clone()
25446    }
25447}
25448impl MessageData for RAW_IMU_DATA {
25449    type Message = MavMessage;
25450    const ID: u32 = 27u32;
25451    const NAME: &'static str = "RAW_IMU";
25452    const EXTRA_CRC: u8 = 144u8;
25453    const ENCODED_LEN: usize = 29usize;
25454    fn deser(
25455        _version: MavlinkVersion,
25456        __input: &[u8],
25457    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25458        let avail_len = __input.len();
25459        let mut payload_buf = [0; Self::ENCODED_LEN];
25460        let mut buf = if avail_len < Self::ENCODED_LEN {
25461            payload_buf[0..avail_len].copy_from_slice(__input);
25462            Bytes::new(&payload_buf)
25463        } else {
25464            Bytes::new(__input)
25465        };
25466        let mut __struct = Self::default();
25467        __struct.time_usec = buf.get_u64_le();
25468        __struct.xacc = buf.get_i16_le();
25469        __struct.yacc = buf.get_i16_le();
25470        __struct.zacc = buf.get_i16_le();
25471        __struct.xgyro = buf.get_i16_le();
25472        __struct.ygyro = buf.get_i16_le();
25473        __struct.zgyro = buf.get_i16_le();
25474        __struct.xmag = buf.get_i16_le();
25475        __struct.ymag = buf.get_i16_le();
25476        __struct.zmag = buf.get_i16_le();
25477        __struct.id = buf.get_u8();
25478        __struct.temperature = buf.get_i16_le();
25479        Ok(__struct)
25480    }
25481    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25482        let mut __tmp = BytesMut::new(bytes);
25483        #[allow(clippy::absurd_extreme_comparisons)]
25484        #[allow(unused_comparisons)]
25485        if __tmp.remaining() < Self::ENCODED_LEN {
25486            panic!(
25487                "buffer is too small (need {} bytes, but got {})",
25488                Self::ENCODED_LEN,
25489                __tmp.remaining(),
25490            )
25491        }
25492        __tmp.put_u64_le(self.time_usec);
25493        __tmp.put_i16_le(self.xacc);
25494        __tmp.put_i16_le(self.yacc);
25495        __tmp.put_i16_le(self.zacc);
25496        __tmp.put_i16_le(self.xgyro);
25497        __tmp.put_i16_le(self.ygyro);
25498        __tmp.put_i16_le(self.zgyro);
25499        __tmp.put_i16_le(self.xmag);
25500        __tmp.put_i16_le(self.ymag);
25501        __tmp.put_i16_le(self.zmag);
25502        if matches!(version, MavlinkVersion::V2) {
25503            __tmp.put_u8(self.id);
25504            __tmp.put_i16_le(self.temperature);
25505            let len = __tmp.len();
25506            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25507        } else {
25508            __tmp.len()
25509        }
25510    }
25511}
25512#[doc = "The RAW pressure readings for the typical setup of one absolute pressure and one differential pressure sensor. The sensor values should be the raw, UNSCALED ADC values."]
25513#[doc = ""]
25514#[doc = "ID: 28"]
25515#[derive(Debug, Clone, PartialEq)]
25516#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25517#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25518pub struct RAW_PRESSURE_DATA {
25519    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
25520    pub time_usec: u64,
25521    #[doc = "Absolute pressure (raw)"]
25522    pub press_abs: i16,
25523    #[doc = "Differential pressure 1 (raw, 0 if nonexistent)"]
25524    pub press_diff1: i16,
25525    #[doc = "Differential pressure 2 (raw, 0 if nonexistent)"]
25526    pub press_diff2: i16,
25527    #[doc = "Raw Temperature measurement (raw)"]
25528    pub temperature: i16,
25529}
25530impl RAW_PRESSURE_DATA {
25531    pub const ENCODED_LEN: usize = 16usize;
25532    pub const DEFAULT: Self = Self {
25533        time_usec: 0_u64,
25534        press_abs: 0_i16,
25535        press_diff1: 0_i16,
25536        press_diff2: 0_i16,
25537        temperature: 0_i16,
25538    };
25539    #[cfg(feature = "arbitrary")]
25540    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25541        use arbitrary::{Arbitrary, Unstructured};
25542        let mut buf = [0u8; 1024];
25543        rng.fill_bytes(&mut buf);
25544        let mut unstructured = Unstructured::new(&buf);
25545        Self::arbitrary(&mut unstructured).unwrap_or_default()
25546    }
25547}
25548impl Default for RAW_PRESSURE_DATA {
25549    fn default() -> Self {
25550        Self::DEFAULT.clone()
25551    }
25552}
25553impl MessageData for RAW_PRESSURE_DATA {
25554    type Message = MavMessage;
25555    const ID: u32 = 28u32;
25556    const NAME: &'static str = "RAW_PRESSURE";
25557    const EXTRA_CRC: u8 = 67u8;
25558    const ENCODED_LEN: usize = 16usize;
25559    fn deser(
25560        _version: MavlinkVersion,
25561        __input: &[u8],
25562    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25563        let avail_len = __input.len();
25564        let mut payload_buf = [0; Self::ENCODED_LEN];
25565        let mut buf = if avail_len < Self::ENCODED_LEN {
25566            payload_buf[0..avail_len].copy_from_slice(__input);
25567            Bytes::new(&payload_buf)
25568        } else {
25569            Bytes::new(__input)
25570        };
25571        let mut __struct = Self::default();
25572        __struct.time_usec = buf.get_u64_le();
25573        __struct.press_abs = buf.get_i16_le();
25574        __struct.press_diff1 = buf.get_i16_le();
25575        __struct.press_diff2 = buf.get_i16_le();
25576        __struct.temperature = buf.get_i16_le();
25577        Ok(__struct)
25578    }
25579    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25580        let mut __tmp = BytesMut::new(bytes);
25581        #[allow(clippy::absurd_extreme_comparisons)]
25582        #[allow(unused_comparisons)]
25583        if __tmp.remaining() < Self::ENCODED_LEN {
25584            panic!(
25585                "buffer is too small (need {} bytes, but got {})",
25586                Self::ENCODED_LEN,
25587                __tmp.remaining(),
25588            )
25589        }
25590        __tmp.put_u64_le(self.time_usec);
25591        __tmp.put_i16_le(self.press_abs);
25592        __tmp.put_i16_le(self.press_diff1);
25593        __tmp.put_i16_le(self.press_diff2);
25594        __tmp.put_i16_le(self.temperature);
25595        if matches!(version, MavlinkVersion::V2) {
25596            let len = __tmp.len();
25597            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25598        } else {
25599            __tmp.len()
25600        }
25601    }
25602}
25603#[doc = "RPM sensor data message."]
25604#[doc = ""]
25605#[doc = "ID: 339"]
25606#[derive(Debug, Clone, PartialEq)]
25607#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25608#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25609pub struct RAW_RPM_DATA {
25610    #[doc = "Indicated rate"]
25611    pub frequency: f32,
25612    #[doc = "Index of this RPM sensor (0-indexed)"]
25613    pub index: u8,
25614}
25615impl RAW_RPM_DATA {
25616    pub const ENCODED_LEN: usize = 5usize;
25617    pub const DEFAULT: Self = Self {
25618        frequency: 0.0_f32,
25619        index: 0_u8,
25620    };
25621    #[cfg(feature = "arbitrary")]
25622    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25623        use arbitrary::{Arbitrary, Unstructured};
25624        let mut buf = [0u8; 1024];
25625        rng.fill_bytes(&mut buf);
25626        let mut unstructured = Unstructured::new(&buf);
25627        Self::arbitrary(&mut unstructured).unwrap_or_default()
25628    }
25629}
25630impl Default for RAW_RPM_DATA {
25631    fn default() -> Self {
25632        Self::DEFAULT.clone()
25633    }
25634}
25635impl MessageData for RAW_RPM_DATA {
25636    type Message = MavMessage;
25637    const ID: u32 = 339u32;
25638    const NAME: &'static str = "RAW_RPM";
25639    const EXTRA_CRC: u8 = 199u8;
25640    const ENCODED_LEN: usize = 5usize;
25641    fn deser(
25642        _version: MavlinkVersion,
25643        __input: &[u8],
25644    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25645        let avail_len = __input.len();
25646        let mut payload_buf = [0; Self::ENCODED_LEN];
25647        let mut buf = if avail_len < Self::ENCODED_LEN {
25648            payload_buf[0..avail_len].copy_from_slice(__input);
25649            Bytes::new(&payload_buf)
25650        } else {
25651            Bytes::new(__input)
25652        };
25653        let mut __struct = Self::default();
25654        __struct.frequency = buf.get_f32_le();
25655        __struct.index = buf.get_u8();
25656        Ok(__struct)
25657    }
25658    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25659        let mut __tmp = BytesMut::new(bytes);
25660        #[allow(clippy::absurd_extreme_comparisons)]
25661        #[allow(unused_comparisons)]
25662        if __tmp.remaining() < Self::ENCODED_LEN {
25663            panic!(
25664                "buffer is too small (need {} bytes, but got {})",
25665                Self::ENCODED_LEN,
25666                __tmp.remaining(),
25667            )
25668        }
25669        __tmp.put_f32_le(self.frequency);
25670        __tmp.put_u8(self.index);
25671        if matches!(version, MavlinkVersion::V2) {
25672            let len = __tmp.len();
25673            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25674        } else {
25675            __tmp.len()
25676        }
25677    }
25678}
25679#[doc = "The PPM values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%.  A value of UINT16_MAX implies the channel is unused. Individual receivers/transmitters might violate this specification."]
25680#[doc = ""]
25681#[doc = "ID: 65"]
25682#[derive(Debug, Clone, PartialEq)]
25683#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25684#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25685pub struct RC_CHANNELS_DATA {
25686    #[doc = "Timestamp (time since system boot)."]
25687    pub time_boot_ms: u32,
25688    #[doc = "RC channel 1 value."]
25689    pub chan1_raw: u16,
25690    #[doc = "RC channel 2 value."]
25691    pub chan2_raw: u16,
25692    #[doc = "RC channel 3 value."]
25693    pub chan3_raw: u16,
25694    #[doc = "RC channel 4 value."]
25695    pub chan4_raw: u16,
25696    #[doc = "RC channel 5 value."]
25697    pub chan5_raw: u16,
25698    #[doc = "RC channel 6 value."]
25699    pub chan6_raw: u16,
25700    #[doc = "RC channel 7 value."]
25701    pub chan7_raw: u16,
25702    #[doc = "RC channel 8 value."]
25703    pub chan8_raw: u16,
25704    #[doc = "RC channel 9 value."]
25705    pub chan9_raw: u16,
25706    #[doc = "RC channel 10 value."]
25707    pub chan10_raw: u16,
25708    #[doc = "RC channel 11 value."]
25709    pub chan11_raw: u16,
25710    #[doc = "RC channel 12 value."]
25711    pub chan12_raw: u16,
25712    #[doc = "RC channel 13 value."]
25713    pub chan13_raw: u16,
25714    #[doc = "RC channel 14 value."]
25715    pub chan14_raw: u16,
25716    #[doc = "RC channel 15 value."]
25717    pub chan15_raw: u16,
25718    #[doc = "RC channel 16 value."]
25719    pub chan16_raw: u16,
25720    #[doc = "RC channel 17 value."]
25721    pub chan17_raw: u16,
25722    #[doc = "RC channel 18 value."]
25723    pub chan18_raw: u16,
25724    #[doc = "Total number of RC channels being received. This can be larger than 18, indicating that more channels are available but not given in this message. This value should be 0 when no RC channels are available."]
25725    pub chancount: u8,
25726    #[doc = "Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
25727    pub rssi: u8,
25728}
25729impl RC_CHANNELS_DATA {
25730    pub const ENCODED_LEN: usize = 42usize;
25731    pub const DEFAULT: Self = Self {
25732        time_boot_ms: 0_u32,
25733        chan1_raw: 0_u16,
25734        chan2_raw: 0_u16,
25735        chan3_raw: 0_u16,
25736        chan4_raw: 0_u16,
25737        chan5_raw: 0_u16,
25738        chan6_raw: 0_u16,
25739        chan7_raw: 0_u16,
25740        chan8_raw: 0_u16,
25741        chan9_raw: 0_u16,
25742        chan10_raw: 0_u16,
25743        chan11_raw: 0_u16,
25744        chan12_raw: 0_u16,
25745        chan13_raw: 0_u16,
25746        chan14_raw: 0_u16,
25747        chan15_raw: 0_u16,
25748        chan16_raw: 0_u16,
25749        chan17_raw: 0_u16,
25750        chan18_raw: 0_u16,
25751        chancount: 0_u8,
25752        rssi: 0_u8,
25753    };
25754    #[cfg(feature = "arbitrary")]
25755    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25756        use arbitrary::{Arbitrary, Unstructured};
25757        let mut buf = [0u8; 1024];
25758        rng.fill_bytes(&mut buf);
25759        let mut unstructured = Unstructured::new(&buf);
25760        Self::arbitrary(&mut unstructured).unwrap_or_default()
25761    }
25762}
25763impl Default for RC_CHANNELS_DATA {
25764    fn default() -> Self {
25765        Self::DEFAULT.clone()
25766    }
25767}
25768impl MessageData for RC_CHANNELS_DATA {
25769    type Message = MavMessage;
25770    const ID: u32 = 65u32;
25771    const NAME: &'static str = "RC_CHANNELS";
25772    const EXTRA_CRC: u8 = 118u8;
25773    const ENCODED_LEN: usize = 42usize;
25774    fn deser(
25775        _version: MavlinkVersion,
25776        __input: &[u8],
25777    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25778        let avail_len = __input.len();
25779        let mut payload_buf = [0; Self::ENCODED_LEN];
25780        let mut buf = if avail_len < Self::ENCODED_LEN {
25781            payload_buf[0..avail_len].copy_from_slice(__input);
25782            Bytes::new(&payload_buf)
25783        } else {
25784            Bytes::new(__input)
25785        };
25786        let mut __struct = Self::default();
25787        __struct.time_boot_ms = buf.get_u32_le();
25788        __struct.chan1_raw = buf.get_u16_le();
25789        __struct.chan2_raw = buf.get_u16_le();
25790        __struct.chan3_raw = buf.get_u16_le();
25791        __struct.chan4_raw = buf.get_u16_le();
25792        __struct.chan5_raw = buf.get_u16_le();
25793        __struct.chan6_raw = buf.get_u16_le();
25794        __struct.chan7_raw = buf.get_u16_le();
25795        __struct.chan8_raw = buf.get_u16_le();
25796        __struct.chan9_raw = buf.get_u16_le();
25797        __struct.chan10_raw = buf.get_u16_le();
25798        __struct.chan11_raw = buf.get_u16_le();
25799        __struct.chan12_raw = buf.get_u16_le();
25800        __struct.chan13_raw = buf.get_u16_le();
25801        __struct.chan14_raw = buf.get_u16_le();
25802        __struct.chan15_raw = buf.get_u16_le();
25803        __struct.chan16_raw = buf.get_u16_le();
25804        __struct.chan17_raw = buf.get_u16_le();
25805        __struct.chan18_raw = buf.get_u16_le();
25806        __struct.chancount = buf.get_u8();
25807        __struct.rssi = buf.get_u8();
25808        Ok(__struct)
25809    }
25810    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25811        let mut __tmp = BytesMut::new(bytes);
25812        #[allow(clippy::absurd_extreme_comparisons)]
25813        #[allow(unused_comparisons)]
25814        if __tmp.remaining() < Self::ENCODED_LEN {
25815            panic!(
25816                "buffer is too small (need {} bytes, but got {})",
25817                Self::ENCODED_LEN,
25818                __tmp.remaining(),
25819            )
25820        }
25821        __tmp.put_u32_le(self.time_boot_ms);
25822        __tmp.put_u16_le(self.chan1_raw);
25823        __tmp.put_u16_le(self.chan2_raw);
25824        __tmp.put_u16_le(self.chan3_raw);
25825        __tmp.put_u16_le(self.chan4_raw);
25826        __tmp.put_u16_le(self.chan5_raw);
25827        __tmp.put_u16_le(self.chan6_raw);
25828        __tmp.put_u16_le(self.chan7_raw);
25829        __tmp.put_u16_le(self.chan8_raw);
25830        __tmp.put_u16_le(self.chan9_raw);
25831        __tmp.put_u16_le(self.chan10_raw);
25832        __tmp.put_u16_le(self.chan11_raw);
25833        __tmp.put_u16_le(self.chan12_raw);
25834        __tmp.put_u16_le(self.chan13_raw);
25835        __tmp.put_u16_le(self.chan14_raw);
25836        __tmp.put_u16_le(self.chan15_raw);
25837        __tmp.put_u16_le(self.chan16_raw);
25838        __tmp.put_u16_le(self.chan17_raw);
25839        __tmp.put_u16_le(self.chan18_raw);
25840        __tmp.put_u8(self.chancount);
25841        __tmp.put_u8(self.rssi);
25842        if matches!(version, MavlinkVersion::V2) {
25843            let len = __tmp.len();
25844            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25845        } else {
25846            __tmp.len()
25847        }
25848    }
25849}
25850#[doc = "The RAW values of the RC channels sent to the MAV to override info received from the RC radio. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. Individual receivers/transmitters might violate this specification.  Note carefully the semantic differences between the first 8 channels and the subsequent channels."]
25851#[doc = ""]
25852#[doc = "ID: 70"]
25853#[derive(Debug, Clone, PartialEq)]
25854#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25855#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25856pub struct RC_CHANNELS_OVERRIDE_DATA {
25857    #[doc = "RC channel 1 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
25858    pub chan1_raw: u16,
25859    #[doc = "RC channel 2 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
25860    pub chan2_raw: u16,
25861    #[doc = "RC channel 3 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
25862    pub chan3_raw: u16,
25863    #[doc = "RC channel 4 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
25864    pub chan4_raw: u16,
25865    #[doc = "RC channel 5 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
25866    pub chan5_raw: u16,
25867    #[doc = "RC channel 6 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
25868    pub chan6_raw: u16,
25869    #[doc = "RC channel 7 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
25870    pub chan7_raw: u16,
25871    #[doc = "RC channel 8 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
25872    pub chan8_raw: u16,
25873    #[doc = "System ID"]
25874    pub target_system: u8,
25875    #[doc = "Component ID"]
25876    pub target_component: u8,
25877    #[doc = "RC channel 9 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25878    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25879    pub chan9_raw: u16,
25880    #[doc = "RC channel 10 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25881    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25882    pub chan10_raw: u16,
25883    #[doc = "RC channel 11 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25884    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25885    pub chan11_raw: u16,
25886    #[doc = "RC channel 12 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25887    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25888    pub chan12_raw: u16,
25889    #[doc = "RC channel 13 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25890    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25891    pub chan13_raw: u16,
25892    #[doc = "RC channel 14 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25893    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25894    pub chan14_raw: u16,
25895    #[doc = "RC channel 15 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25896    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25897    pub chan15_raw: u16,
25898    #[doc = "RC channel 16 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25899    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25900    pub chan16_raw: u16,
25901    #[doc = "RC channel 17 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25902    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25903    pub chan17_raw: u16,
25904    #[doc = "RC channel 18 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25905    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25906    pub chan18_raw: u16,
25907}
25908impl RC_CHANNELS_OVERRIDE_DATA {
25909    pub const ENCODED_LEN: usize = 38usize;
25910    pub const DEFAULT: Self = Self {
25911        chan1_raw: 0_u16,
25912        chan2_raw: 0_u16,
25913        chan3_raw: 0_u16,
25914        chan4_raw: 0_u16,
25915        chan5_raw: 0_u16,
25916        chan6_raw: 0_u16,
25917        chan7_raw: 0_u16,
25918        chan8_raw: 0_u16,
25919        target_system: 0_u8,
25920        target_component: 0_u8,
25921        chan9_raw: 0_u16,
25922        chan10_raw: 0_u16,
25923        chan11_raw: 0_u16,
25924        chan12_raw: 0_u16,
25925        chan13_raw: 0_u16,
25926        chan14_raw: 0_u16,
25927        chan15_raw: 0_u16,
25928        chan16_raw: 0_u16,
25929        chan17_raw: 0_u16,
25930        chan18_raw: 0_u16,
25931    };
25932    #[cfg(feature = "arbitrary")]
25933    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25934        use arbitrary::{Arbitrary, Unstructured};
25935        let mut buf = [0u8; 1024];
25936        rng.fill_bytes(&mut buf);
25937        let mut unstructured = Unstructured::new(&buf);
25938        Self::arbitrary(&mut unstructured).unwrap_or_default()
25939    }
25940}
25941impl Default for RC_CHANNELS_OVERRIDE_DATA {
25942    fn default() -> Self {
25943        Self::DEFAULT.clone()
25944    }
25945}
25946impl MessageData for RC_CHANNELS_OVERRIDE_DATA {
25947    type Message = MavMessage;
25948    const ID: u32 = 70u32;
25949    const NAME: &'static str = "RC_CHANNELS_OVERRIDE";
25950    const EXTRA_CRC: u8 = 124u8;
25951    const ENCODED_LEN: usize = 38usize;
25952    fn deser(
25953        _version: MavlinkVersion,
25954        __input: &[u8],
25955    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25956        let avail_len = __input.len();
25957        let mut payload_buf = [0; Self::ENCODED_LEN];
25958        let mut buf = if avail_len < Self::ENCODED_LEN {
25959            payload_buf[0..avail_len].copy_from_slice(__input);
25960            Bytes::new(&payload_buf)
25961        } else {
25962            Bytes::new(__input)
25963        };
25964        let mut __struct = Self::default();
25965        __struct.chan1_raw = buf.get_u16_le();
25966        __struct.chan2_raw = buf.get_u16_le();
25967        __struct.chan3_raw = buf.get_u16_le();
25968        __struct.chan4_raw = buf.get_u16_le();
25969        __struct.chan5_raw = buf.get_u16_le();
25970        __struct.chan6_raw = buf.get_u16_le();
25971        __struct.chan7_raw = buf.get_u16_le();
25972        __struct.chan8_raw = buf.get_u16_le();
25973        __struct.target_system = buf.get_u8();
25974        __struct.target_component = buf.get_u8();
25975        __struct.chan9_raw = buf.get_u16_le();
25976        __struct.chan10_raw = buf.get_u16_le();
25977        __struct.chan11_raw = buf.get_u16_le();
25978        __struct.chan12_raw = buf.get_u16_le();
25979        __struct.chan13_raw = buf.get_u16_le();
25980        __struct.chan14_raw = buf.get_u16_le();
25981        __struct.chan15_raw = buf.get_u16_le();
25982        __struct.chan16_raw = buf.get_u16_le();
25983        __struct.chan17_raw = buf.get_u16_le();
25984        __struct.chan18_raw = buf.get_u16_le();
25985        Ok(__struct)
25986    }
25987    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25988        let mut __tmp = BytesMut::new(bytes);
25989        #[allow(clippy::absurd_extreme_comparisons)]
25990        #[allow(unused_comparisons)]
25991        if __tmp.remaining() < Self::ENCODED_LEN {
25992            panic!(
25993                "buffer is too small (need {} bytes, but got {})",
25994                Self::ENCODED_LEN,
25995                __tmp.remaining(),
25996            )
25997        }
25998        __tmp.put_u16_le(self.chan1_raw);
25999        __tmp.put_u16_le(self.chan2_raw);
26000        __tmp.put_u16_le(self.chan3_raw);
26001        __tmp.put_u16_le(self.chan4_raw);
26002        __tmp.put_u16_le(self.chan5_raw);
26003        __tmp.put_u16_le(self.chan6_raw);
26004        __tmp.put_u16_le(self.chan7_raw);
26005        __tmp.put_u16_le(self.chan8_raw);
26006        __tmp.put_u8(self.target_system);
26007        __tmp.put_u8(self.target_component);
26008        if matches!(version, MavlinkVersion::V2) {
26009            __tmp.put_u16_le(self.chan9_raw);
26010            __tmp.put_u16_le(self.chan10_raw);
26011            __tmp.put_u16_le(self.chan11_raw);
26012            __tmp.put_u16_le(self.chan12_raw);
26013            __tmp.put_u16_le(self.chan13_raw);
26014            __tmp.put_u16_le(self.chan14_raw);
26015            __tmp.put_u16_le(self.chan15_raw);
26016            __tmp.put_u16_le(self.chan16_raw);
26017            __tmp.put_u16_le(self.chan17_raw);
26018            __tmp.put_u16_le(self.chan18_raw);
26019            let len = __tmp.len();
26020            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26021        } else {
26022            __tmp.len()
26023        }
26024    }
26025}
26026#[doc = "The RAW values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. A value of UINT16_MAX implies the channel is unused. Individual receivers/transmitters might violate this specification."]
26027#[doc = ""]
26028#[doc = "ID: 35"]
26029#[derive(Debug, Clone, PartialEq)]
26030#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26031#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26032pub struct RC_CHANNELS_RAW_DATA {
26033    #[doc = "Timestamp (time since system boot)."]
26034    pub time_boot_ms: u32,
26035    #[doc = "RC channel 1 value."]
26036    pub chan1_raw: u16,
26037    #[doc = "RC channel 2 value."]
26038    pub chan2_raw: u16,
26039    #[doc = "RC channel 3 value."]
26040    pub chan3_raw: u16,
26041    #[doc = "RC channel 4 value."]
26042    pub chan4_raw: u16,
26043    #[doc = "RC channel 5 value."]
26044    pub chan5_raw: u16,
26045    #[doc = "RC channel 6 value."]
26046    pub chan6_raw: u16,
26047    #[doc = "RC channel 7 value."]
26048    pub chan7_raw: u16,
26049    #[doc = "RC channel 8 value."]
26050    pub chan8_raw: u16,
26051    #[doc = "Servo output port (set of 8 outputs = 1 port). Flight stacks running on Pixhawk should use: 0 = MAIN, 1 = AUX."]
26052    pub port: u8,
26053    #[doc = "Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
26054    pub rssi: u8,
26055}
26056impl RC_CHANNELS_RAW_DATA {
26057    pub const ENCODED_LEN: usize = 22usize;
26058    pub const DEFAULT: Self = Self {
26059        time_boot_ms: 0_u32,
26060        chan1_raw: 0_u16,
26061        chan2_raw: 0_u16,
26062        chan3_raw: 0_u16,
26063        chan4_raw: 0_u16,
26064        chan5_raw: 0_u16,
26065        chan6_raw: 0_u16,
26066        chan7_raw: 0_u16,
26067        chan8_raw: 0_u16,
26068        port: 0_u8,
26069        rssi: 0_u8,
26070    };
26071    #[cfg(feature = "arbitrary")]
26072    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26073        use arbitrary::{Arbitrary, Unstructured};
26074        let mut buf = [0u8; 1024];
26075        rng.fill_bytes(&mut buf);
26076        let mut unstructured = Unstructured::new(&buf);
26077        Self::arbitrary(&mut unstructured).unwrap_or_default()
26078    }
26079}
26080impl Default for RC_CHANNELS_RAW_DATA {
26081    fn default() -> Self {
26082        Self::DEFAULT.clone()
26083    }
26084}
26085impl MessageData for RC_CHANNELS_RAW_DATA {
26086    type Message = MavMessage;
26087    const ID: u32 = 35u32;
26088    const NAME: &'static str = "RC_CHANNELS_RAW";
26089    const EXTRA_CRC: u8 = 244u8;
26090    const ENCODED_LEN: usize = 22usize;
26091    fn deser(
26092        _version: MavlinkVersion,
26093        __input: &[u8],
26094    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26095        let avail_len = __input.len();
26096        let mut payload_buf = [0; Self::ENCODED_LEN];
26097        let mut buf = if avail_len < Self::ENCODED_LEN {
26098            payload_buf[0..avail_len].copy_from_slice(__input);
26099            Bytes::new(&payload_buf)
26100        } else {
26101            Bytes::new(__input)
26102        };
26103        let mut __struct = Self::default();
26104        __struct.time_boot_ms = buf.get_u32_le();
26105        __struct.chan1_raw = buf.get_u16_le();
26106        __struct.chan2_raw = buf.get_u16_le();
26107        __struct.chan3_raw = buf.get_u16_le();
26108        __struct.chan4_raw = buf.get_u16_le();
26109        __struct.chan5_raw = buf.get_u16_le();
26110        __struct.chan6_raw = buf.get_u16_le();
26111        __struct.chan7_raw = buf.get_u16_le();
26112        __struct.chan8_raw = buf.get_u16_le();
26113        __struct.port = buf.get_u8();
26114        __struct.rssi = buf.get_u8();
26115        Ok(__struct)
26116    }
26117    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26118        let mut __tmp = BytesMut::new(bytes);
26119        #[allow(clippy::absurd_extreme_comparisons)]
26120        #[allow(unused_comparisons)]
26121        if __tmp.remaining() < Self::ENCODED_LEN {
26122            panic!(
26123                "buffer is too small (need {} bytes, but got {})",
26124                Self::ENCODED_LEN,
26125                __tmp.remaining(),
26126            )
26127        }
26128        __tmp.put_u32_le(self.time_boot_ms);
26129        __tmp.put_u16_le(self.chan1_raw);
26130        __tmp.put_u16_le(self.chan2_raw);
26131        __tmp.put_u16_le(self.chan3_raw);
26132        __tmp.put_u16_le(self.chan4_raw);
26133        __tmp.put_u16_le(self.chan5_raw);
26134        __tmp.put_u16_le(self.chan6_raw);
26135        __tmp.put_u16_le(self.chan7_raw);
26136        __tmp.put_u16_le(self.chan8_raw);
26137        __tmp.put_u8(self.port);
26138        __tmp.put_u8(self.rssi);
26139        if matches!(version, MavlinkVersion::V2) {
26140            let len = __tmp.len();
26141            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26142        } else {
26143            __tmp.len()
26144        }
26145    }
26146}
26147#[doc = "The scaled values of the RC channels received: (-100%) -10000, (0%) 0, (100%) 10000. Channels that are inactive should be set to INT16_MAX."]
26148#[doc = ""]
26149#[doc = "ID: 34"]
26150#[derive(Debug, Clone, PartialEq)]
26151#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26152#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26153pub struct RC_CHANNELS_SCALED_DATA {
26154    #[doc = "Timestamp (time since system boot)."]
26155    pub time_boot_ms: u32,
26156    #[doc = "RC channel 1 value scaled."]
26157    pub chan1_scaled: i16,
26158    #[doc = "RC channel 2 value scaled."]
26159    pub chan2_scaled: i16,
26160    #[doc = "RC channel 3 value scaled."]
26161    pub chan3_scaled: i16,
26162    #[doc = "RC channel 4 value scaled."]
26163    pub chan4_scaled: i16,
26164    #[doc = "RC channel 5 value scaled."]
26165    pub chan5_scaled: i16,
26166    #[doc = "RC channel 6 value scaled."]
26167    pub chan6_scaled: i16,
26168    #[doc = "RC channel 7 value scaled."]
26169    pub chan7_scaled: i16,
26170    #[doc = "RC channel 8 value scaled."]
26171    pub chan8_scaled: i16,
26172    #[doc = "Servo output port (set of 8 outputs = 1 port). Flight stacks running on Pixhawk should use: 0 = MAIN, 1 = AUX."]
26173    pub port: u8,
26174    #[doc = "Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
26175    pub rssi: u8,
26176}
26177impl RC_CHANNELS_SCALED_DATA {
26178    pub const ENCODED_LEN: usize = 22usize;
26179    pub const DEFAULT: Self = Self {
26180        time_boot_ms: 0_u32,
26181        chan1_scaled: 0_i16,
26182        chan2_scaled: 0_i16,
26183        chan3_scaled: 0_i16,
26184        chan4_scaled: 0_i16,
26185        chan5_scaled: 0_i16,
26186        chan6_scaled: 0_i16,
26187        chan7_scaled: 0_i16,
26188        chan8_scaled: 0_i16,
26189        port: 0_u8,
26190        rssi: 0_u8,
26191    };
26192    #[cfg(feature = "arbitrary")]
26193    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26194        use arbitrary::{Arbitrary, Unstructured};
26195        let mut buf = [0u8; 1024];
26196        rng.fill_bytes(&mut buf);
26197        let mut unstructured = Unstructured::new(&buf);
26198        Self::arbitrary(&mut unstructured).unwrap_or_default()
26199    }
26200}
26201impl Default for RC_CHANNELS_SCALED_DATA {
26202    fn default() -> Self {
26203        Self::DEFAULT.clone()
26204    }
26205}
26206impl MessageData for RC_CHANNELS_SCALED_DATA {
26207    type Message = MavMessage;
26208    const ID: u32 = 34u32;
26209    const NAME: &'static str = "RC_CHANNELS_SCALED";
26210    const EXTRA_CRC: u8 = 237u8;
26211    const ENCODED_LEN: usize = 22usize;
26212    fn deser(
26213        _version: MavlinkVersion,
26214        __input: &[u8],
26215    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26216        let avail_len = __input.len();
26217        let mut payload_buf = [0; Self::ENCODED_LEN];
26218        let mut buf = if avail_len < Self::ENCODED_LEN {
26219            payload_buf[0..avail_len].copy_from_slice(__input);
26220            Bytes::new(&payload_buf)
26221        } else {
26222            Bytes::new(__input)
26223        };
26224        let mut __struct = Self::default();
26225        __struct.time_boot_ms = buf.get_u32_le();
26226        __struct.chan1_scaled = buf.get_i16_le();
26227        __struct.chan2_scaled = buf.get_i16_le();
26228        __struct.chan3_scaled = buf.get_i16_le();
26229        __struct.chan4_scaled = buf.get_i16_le();
26230        __struct.chan5_scaled = buf.get_i16_le();
26231        __struct.chan6_scaled = buf.get_i16_le();
26232        __struct.chan7_scaled = buf.get_i16_le();
26233        __struct.chan8_scaled = buf.get_i16_le();
26234        __struct.port = buf.get_u8();
26235        __struct.rssi = buf.get_u8();
26236        Ok(__struct)
26237    }
26238    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26239        let mut __tmp = BytesMut::new(bytes);
26240        #[allow(clippy::absurd_extreme_comparisons)]
26241        #[allow(unused_comparisons)]
26242        if __tmp.remaining() < Self::ENCODED_LEN {
26243            panic!(
26244                "buffer is too small (need {} bytes, but got {})",
26245                Self::ENCODED_LEN,
26246                __tmp.remaining(),
26247            )
26248        }
26249        __tmp.put_u32_le(self.time_boot_ms);
26250        __tmp.put_i16_le(self.chan1_scaled);
26251        __tmp.put_i16_le(self.chan2_scaled);
26252        __tmp.put_i16_le(self.chan3_scaled);
26253        __tmp.put_i16_le(self.chan4_scaled);
26254        __tmp.put_i16_le(self.chan5_scaled);
26255        __tmp.put_i16_le(self.chan6_scaled);
26256        __tmp.put_i16_le(self.chan7_scaled);
26257        __tmp.put_i16_le(self.chan8_scaled);
26258        __tmp.put_u8(self.port);
26259        __tmp.put_u8(self.rssi);
26260        if matches!(version, MavlinkVersion::V2) {
26261            let len = __tmp.len();
26262            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26263        } else {
26264            __tmp.len()
26265        }
26266    }
26267}
26268#[deprecated = " See `MAV_CMD_SET_MESSAGE_INTERVAL ` (Deprecated since 2015-08)"]
26269#[doc = "Request a data stream."]
26270#[doc = ""]
26271#[doc = "ID: 66"]
26272#[derive(Debug, Clone, PartialEq)]
26273#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26274#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26275pub struct REQUEST_DATA_STREAM_DATA {
26276    #[doc = "The requested message rate"]
26277    pub req_message_rate: u16,
26278    #[doc = "The target requested to send the message stream."]
26279    pub target_system: u8,
26280    #[doc = "The target requested to send the message stream."]
26281    pub target_component: u8,
26282    #[doc = "The ID of the requested data stream"]
26283    pub req_stream_id: u8,
26284    #[doc = "1 to start sending, 0 to stop sending."]
26285    pub start_stop: u8,
26286}
26287impl REQUEST_DATA_STREAM_DATA {
26288    pub const ENCODED_LEN: usize = 6usize;
26289    pub const DEFAULT: Self = Self {
26290        req_message_rate: 0_u16,
26291        target_system: 0_u8,
26292        target_component: 0_u8,
26293        req_stream_id: 0_u8,
26294        start_stop: 0_u8,
26295    };
26296    #[cfg(feature = "arbitrary")]
26297    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26298        use arbitrary::{Arbitrary, Unstructured};
26299        let mut buf = [0u8; 1024];
26300        rng.fill_bytes(&mut buf);
26301        let mut unstructured = Unstructured::new(&buf);
26302        Self::arbitrary(&mut unstructured).unwrap_or_default()
26303    }
26304}
26305impl Default for REQUEST_DATA_STREAM_DATA {
26306    fn default() -> Self {
26307        Self::DEFAULT.clone()
26308    }
26309}
26310impl MessageData for REQUEST_DATA_STREAM_DATA {
26311    type Message = MavMessage;
26312    const ID: u32 = 66u32;
26313    const NAME: &'static str = "REQUEST_DATA_STREAM";
26314    const EXTRA_CRC: u8 = 148u8;
26315    const ENCODED_LEN: usize = 6usize;
26316    fn deser(
26317        _version: MavlinkVersion,
26318        __input: &[u8],
26319    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26320        let avail_len = __input.len();
26321        let mut payload_buf = [0; Self::ENCODED_LEN];
26322        let mut buf = if avail_len < Self::ENCODED_LEN {
26323            payload_buf[0..avail_len].copy_from_slice(__input);
26324            Bytes::new(&payload_buf)
26325        } else {
26326            Bytes::new(__input)
26327        };
26328        let mut __struct = Self::default();
26329        __struct.req_message_rate = buf.get_u16_le();
26330        __struct.target_system = buf.get_u8();
26331        __struct.target_component = buf.get_u8();
26332        __struct.req_stream_id = buf.get_u8();
26333        __struct.start_stop = buf.get_u8();
26334        Ok(__struct)
26335    }
26336    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26337        let mut __tmp = BytesMut::new(bytes);
26338        #[allow(clippy::absurd_extreme_comparisons)]
26339        #[allow(unused_comparisons)]
26340        if __tmp.remaining() < Self::ENCODED_LEN {
26341            panic!(
26342                "buffer is too small (need {} bytes, but got {})",
26343                Self::ENCODED_LEN,
26344                __tmp.remaining(),
26345            )
26346        }
26347        __tmp.put_u16_le(self.req_message_rate);
26348        __tmp.put_u8(self.target_system);
26349        __tmp.put_u8(self.target_component);
26350        __tmp.put_u8(self.req_stream_id);
26351        __tmp.put_u8(self.start_stop);
26352        if matches!(version, MavlinkVersion::V2) {
26353            let len = __tmp.len();
26354            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26355        } else {
26356            __tmp.len()
26357        }
26358    }
26359}
26360#[doc = "Request one or more events to be (re-)sent. If first_sequence==last_sequence, only a single event is requested. Note that first_sequence can be larger than last_sequence (because the sequence number can wrap). Each sequence will trigger an EVENT or EVENT_ERROR response."]
26361#[doc = ""]
26362#[doc = "ID: 412"]
26363#[derive(Debug, Clone, PartialEq)]
26364#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26365#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26366pub struct REQUEST_EVENT_DATA {
26367    #[doc = "First sequence number of the requested event."]
26368    pub first_sequence: u16,
26369    #[doc = "Last sequence number of the requested event."]
26370    pub last_sequence: u16,
26371    #[doc = "System ID"]
26372    pub target_system: u8,
26373    #[doc = "Component ID"]
26374    pub target_component: u8,
26375}
26376impl REQUEST_EVENT_DATA {
26377    pub const ENCODED_LEN: usize = 6usize;
26378    pub const DEFAULT: Self = Self {
26379        first_sequence: 0_u16,
26380        last_sequence: 0_u16,
26381        target_system: 0_u8,
26382        target_component: 0_u8,
26383    };
26384    #[cfg(feature = "arbitrary")]
26385    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26386        use arbitrary::{Arbitrary, Unstructured};
26387        let mut buf = [0u8; 1024];
26388        rng.fill_bytes(&mut buf);
26389        let mut unstructured = Unstructured::new(&buf);
26390        Self::arbitrary(&mut unstructured).unwrap_or_default()
26391    }
26392}
26393impl Default for REQUEST_EVENT_DATA {
26394    fn default() -> Self {
26395        Self::DEFAULT.clone()
26396    }
26397}
26398impl MessageData for REQUEST_EVENT_DATA {
26399    type Message = MavMessage;
26400    const ID: u32 = 412u32;
26401    const NAME: &'static str = "REQUEST_EVENT";
26402    const EXTRA_CRC: u8 = 33u8;
26403    const ENCODED_LEN: usize = 6usize;
26404    fn deser(
26405        _version: MavlinkVersion,
26406        __input: &[u8],
26407    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26408        let avail_len = __input.len();
26409        let mut payload_buf = [0; Self::ENCODED_LEN];
26410        let mut buf = if avail_len < Self::ENCODED_LEN {
26411            payload_buf[0..avail_len].copy_from_slice(__input);
26412            Bytes::new(&payload_buf)
26413        } else {
26414            Bytes::new(__input)
26415        };
26416        let mut __struct = Self::default();
26417        __struct.first_sequence = buf.get_u16_le();
26418        __struct.last_sequence = buf.get_u16_le();
26419        __struct.target_system = buf.get_u8();
26420        __struct.target_component = buf.get_u8();
26421        Ok(__struct)
26422    }
26423    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26424        let mut __tmp = BytesMut::new(bytes);
26425        #[allow(clippy::absurd_extreme_comparisons)]
26426        #[allow(unused_comparisons)]
26427        if __tmp.remaining() < Self::ENCODED_LEN {
26428            panic!(
26429                "buffer is too small (need {} bytes, but got {})",
26430                Self::ENCODED_LEN,
26431                __tmp.remaining(),
26432            )
26433        }
26434        __tmp.put_u16_le(self.first_sequence);
26435        __tmp.put_u16_le(self.last_sequence);
26436        __tmp.put_u8(self.target_system);
26437        __tmp.put_u8(self.target_component);
26438        if matches!(version, MavlinkVersion::V2) {
26439            let len = __tmp.len();
26440            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26441        } else {
26442            __tmp.len()
26443        }
26444    }
26445}
26446#[doc = "The autopilot is requesting a resource (file, binary, other type of data)."]
26447#[doc = ""]
26448#[doc = "ID: 142"]
26449#[derive(Debug, Clone, PartialEq)]
26450#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26451#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26452pub struct RESOURCE_REQUEST_DATA {
26453    #[doc = "Request ID. This ID should be re-used when sending back URI contents"]
26454    pub request_id: u8,
26455    #[doc = "The type of requested URI. 0 = a file via URL. 1 = a UAVCAN binary"]
26456    pub uri_type: u8,
26457    #[doc = "The requested unique resource identifier (URI). It is not necessarily a straight domain name (depends on the URI type enum)"]
26458    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
26459    pub uri: [u8; 120],
26460    #[doc = "The way the autopilot wants to receive the URI. 0 = MAVLink FTP. 1 = binary stream."]
26461    pub transfer_type: u8,
26462    #[doc = "The storage path the autopilot wants the URI to be stored in. Will only be valid if the transfer_type has a storage associated (e.g. MAVLink FTP)."]
26463    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
26464    pub storage: [u8; 120],
26465}
26466impl RESOURCE_REQUEST_DATA {
26467    pub const ENCODED_LEN: usize = 243usize;
26468    pub const DEFAULT: Self = Self {
26469        request_id: 0_u8,
26470        uri_type: 0_u8,
26471        uri: [0_u8; 120usize],
26472        transfer_type: 0_u8,
26473        storage: [0_u8; 120usize],
26474    };
26475    #[cfg(feature = "arbitrary")]
26476    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26477        use arbitrary::{Arbitrary, Unstructured};
26478        let mut buf = [0u8; 1024];
26479        rng.fill_bytes(&mut buf);
26480        let mut unstructured = Unstructured::new(&buf);
26481        Self::arbitrary(&mut unstructured).unwrap_or_default()
26482    }
26483}
26484impl Default for RESOURCE_REQUEST_DATA {
26485    fn default() -> Self {
26486        Self::DEFAULT.clone()
26487    }
26488}
26489impl MessageData for RESOURCE_REQUEST_DATA {
26490    type Message = MavMessage;
26491    const ID: u32 = 142u32;
26492    const NAME: &'static str = "RESOURCE_REQUEST";
26493    const EXTRA_CRC: u8 = 72u8;
26494    const ENCODED_LEN: usize = 243usize;
26495    fn deser(
26496        _version: MavlinkVersion,
26497        __input: &[u8],
26498    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26499        let avail_len = __input.len();
26500        let mut payload_buf = [0; Self::ENCODED_LEN];
26501        let mut buf = if avail_len < Self::ENCODED_LEN {
26502            payload_buf[0..avail_len].copy_from_slice(__input);
26503            Bytes::new(&payload_buf)
26504        } else {
26505            Bytes::new(__input)
26506        };
26507        let mut __struct = Self::default();
26508        __struct.request_id = buf.get_u8();
26509        __struct.uri_type = buf.get_u8();
26510        for v in &mut __struct.uri {
26511            let val = buf.get_u8();
26512            *v = val;
26513        }
26514        __struct.transfer_type = buf.get_u8();
26515        for v in &mut __struct.storage {
26516            let val = buf.get_u8();
26517            *v = val;
26518        }
26519        Ok(__struct)
26520    }
26521    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26522        let mut __tmp = BytesMut::new(bytes);
26523        #[allow(clippy::absurd_extreme_comparisons)]
26524        #[allow(unused_comparisons)]
26525        if __tmp.remaining() < Self::ENCODED_LEN {
26526            panic!(
26527                "buffer is too small (need {} bytes, but got {})",
26528                Self::ENCODED_LEN,
26529                __tmp.remaining(),
26530            )
26531        }
26532        __tmp.put_u8(self.request_id);
26533        __tmp.put_u8(self.uri_type);
26534        for val in &self.uri {
26535            __tmp.put_u8(*val);
26536        }
26537        __tmp.put_u8(self.transfer_type);
26538        for val in &self.storage {
26539            __tmp.put_u8(*val);
26540        }
26541        if matches!(version, MavlinkVersion::V2) {
26542            let len = __tmp.len();
26543            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26544        } else {
26545            __tmp.len()
26546        }
26547    }
26548}
26549#[doc = "Response to a REQUEST_EVENT in case of an error (e.g. the event is not available anymore)."]
26550#[doc = ""]
26551#[doc = "ID: 413"]
26552#[derive(Debug, Clone, PartialEq)]
26553#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26554#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26555pub struct RESPONSE_EVENT_ERROR_DATA {
26556    #[doc = "Sequence number."]
26557    pub sequence: u16,
26558    #[doc = "Oldest Sequence number that is still available after the sequence set in REQUEST_EVENT."]
26559    pub sequence_oldest_available: u16,
26560    #[doc = "System ID"]
26561    pub target_system: u8,
26562    #[doc = "Component ID"]
26563    pub target_component: u8,
26564    #[doc = "Error reason."]
26565    pub reason: MavEventErrorReason,
26566}
26567impl RESPONSE_EVENT_ERROR_DATA {
26568    pub const ENCODED_LEN: usize = 7usize;
26569    pub const DEFAULT: Self = Self {
26570        sequence: 0_u16,
26571        sequence_oldest_available: 0_u16,
26572        target_system: 0_u8,
26573        target_component: 0_u8,
26574        reason: MavEventErrorReason::DEFAULT,
26575    };
26576    #[cfg(feature = "arbitrary")]
26577    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26578        use arbitrary::{Arbitrary, Unstructured};
26579        let mut buf = [0u8; 1024];
26580        rng.fill_bytes(&mut buf);
26581        let mut unstructured = Unstructured::new(&buf);
26582        Self::arbitrary(&mut unstructured).unwrap_or_default()
26583    }
26584}
26585impl Default for RESPONSE_EVENT_ERROR_DATA {
26586    fn default() -> Self {
26587        Self::DEFAULT.clone()
26588    }
26589}
26590impl MessageData for RESPONSE_EVENT_ERROR_DATA {
26591    type Message = MavMessage;
26592    const ID: u32 = 413u32;
26593    const NAME: &'static str = "RESPONSE_EVENT_ERROR";
26594    const EXTRA_CRC: u8 = 77u8;
26595    const ENCODED_LEN: usize = 7usize;
26596    fn deser(
26597        _version: MavlinkVersion,
26598        __input: &[u8],
26599    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26600        let avail_len = __input.len();
26601        let mut payload_buf = [0; Self::ENCODED_LEN];
26602        let mut buf = if avail_len < Self::ENCODED_LEN {
26603            payload_buf[0..avail_len].copy_from_slice(__input);
26604            Bytes::new(&payload_buf)
26605        } else {
26606            Bytes::new(__input)
26607        };
26608        let mut __struct = Self::default();
26609        __struct.sequence = buf.get_u16_le();
26610        __struct.sequence_oldest_available = buf.get_u16_le();
26611        __struct.target_system = buf.get_u8();
26612        __struct.target_component = buf.get_u8();
26613        let tmp = buf.get_u8();
26614        __struct.reason =
26615            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
26616                enum_type: "MavEventErrorReason",
26617                value: tmp as u32,
26618            })?;
26619        Ok(__struct)
26620    }
26621    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26622        let mut __tmp = BytesMut::new(bytes);
26623        #[allow(clippy::absurd_extreme_comparisons)]
26624        #[allow(unused_comparisons)]
26625        if __tmp.remaining() < Self::ENCODED_LEN {
26626            panic!(
26627                "buffer is too small (need {} bytes, but got {})",
26628                Self::ENCODED_LEN,
26629                __tmp.remaining(),
26630            )
26631        }
26632        __tmp.put_u16_le(self.sequence);
26633        __tmp.put_u16_le(self.sequence_oldest_available);
26634        __tmp.put_u8(self.target_system);
26635        __tmp.put_u8(self.target_component);
26636        __tmp.put_u8(self.reason as u8);
26637        if matches!(version, MavlinkVersion::V2) {
26638            let len = __tmp.len();
26639            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26640        } else {
26641            __tmp.len()
26642        }
26643    }
26644}
26645#[doc = "Read out the safety zone the MAV currently assumes."]
26646#[doc = ""]
26647#[doc = "ID: 55"]
26648#[derive(Debug, Clone, PartialEq)]
26649#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26650#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26651pub struct SAFETY_ALLOWED_AREA_DATA {
26652    #[doc = "x position 1 / Latitude 1"]
26653    pub p1x: f32,
26654    #[doc = "y position 1 / Longitude 1"]
26655    pub p1y: f32,
26656    #[doc = "z position 1 / Altitude 1"]
26657    pub p1z: f32,
26658    #[doc = "x position 2 / Latitude 2"]
26659    pub p2x: f32,
26660    #[doc = "y position 2 / Longitude 2"]
26661    pub p2y: f32,
26662    #[doc = "z position 2 / Altitude 2"]
26663    pub p2z: f32,
26664    #[doc = "Coordinate frame. Can be either global, GPS, right-handed with Z axis up or local, right handed, Z axis down."]
26665    pub frame: MavFrame,
26666}
26667impl SAFETY_ALLOWED_AREA_DATA {
26668    pub const ENCODED_LEN: usize = 25usize;
26669    pub const DEFAULT: Self = Self {
26670        p1x: 0.0_f32,
26671        p1y: 0.0_f32,
26672        p1z: 0.0_f32,
26673        p2x: 0.0_f32,
26674        p2y: 0.0_f32,
26675        p2z: 0.0_f32,
26676        frame: MavFrame::DEFAULT,
26677    };
26678    #[cfg(feature = "arbitrary")]
26679    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26680        use arbitrary::{Arbitrary, Unstructured};
26681        let mut buf = [0u8; 1024];
26682        rng.fill_bytes(&mut buf);
26683        let mut unstructured = Unstructured::new(&buf);
26684        Self::arbitrary(&mut unstructured).unwrap_or_default()
26685    }
26686}
26687impl Default for SAFETY_ALLOWED_AREA_DATA {
26688    fn default() -> Self {
26689        Self::DEFAULT.clone()
26690    }
26691}
26692impl MessageData for SAFETY_ALLOWED_AREA_DATA {
26693    type Message = MavMessage;
26694    const ID: u32 = 55u32;
26695    const NAME: &'static str = "SAFETY_ALLOWED_AREA";
26696    const EXTRA_CRC: u8 = 3u8;
26697    const ENCODED_LEN: usize = 25usize;
26698    fn deser(
26699        _version: MavlinkVersion,
26700        __input: &[u8],
26701    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26702        let avail_len = __input.len();
26703        let mut payload_buf = [0; Self::ENCODED_LEN];
26704        let mut buf = if avail_len < Self::ENCODED_LEN {
26705            payload_buf[0..avail_len].copy_from_slice(__input);
26706            Bytes::new(&payload_buf)
26707        } else {
26708            Bytes::new(__input)
26709        };
26710        let mut __struct = Self::default();
26711        __struct.p1x = buf.get_f32_le();
26712        __struct.p1y = buf.get_f32_le();
26713        __struct.p1z = buf.get_f32_le();
26714        __struct.p2x = buf.get_f32_le();
26715        __struct.p2y = buf.get_f32_le();
26716        __struct.p2z = buf.get_f32_le();
26717        let tmp = buf.get_u8();
26718        __struct.frame =
26719            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
26720                enum_type: "MavFrame",
26721                value: tmp as u32,
26722            })?;
26723        Ok(__struct)
26724    }
26725    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26726        let mut __tmp = BytesMut::new(bytes);
26727        #[allow(clippy::absurd_extreme_comparisons)]
26728        #[allow(unused_comparisons)]
26729        if __tmp.remaining() < Self::ENCODED_LEN {
26730            panic!(
26731                "buffer is too small (need {} bytes, but got {})",
26732                Self::ENCODED_LEN,
26733                __tmp.remaining(),
26734            )
26735        }
26736        __tmp.put_f32_le(self.p1x);
26737        __tmp.put_f32_le(self.p1y);
26738        __tmp.put_f32_le(self.p1z);
26739        __tmp.put_f32_le(self.p2x);
26740        __tmp.put_f32_le(self.p2y);
26741        __tmp.put_f32_le(self.p2z);
26742        __tmp.put_u8(self.frame as u8);
26743        if matches!(version, MavlinkVersion::V2) {
26744            let len = __tmp.len();
26745            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26746        } else {
26747            __tmp.len()
26748        }
26749    }
26750}
26751#[doc = "Set a safety zone (volume), which is defined by two corners of a cube. This message can be used to tell the MAV which setpoints/waypoints to accept and which to reject. Safety areas are often enforced by national or competition regulations."]
26752#[doc = ""]
26753#[doc = "ID: 54"]
26754#[derive(Debug, Clone, PartialEq)]
26755#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26756#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26757pub struct SAFETY_SET_ALLOWED_AREA_DATA {
26758    #[doc = "x position 1 / Latitude 1"]
26759    pub p1x: f32,
26760    #[doc = "y position 1 / Longitude 1"]
26761    pub p1y: f32,
26762    #[doc = "z position 1 / Altitude 1"]
26763    pub p1z: f32,
26764    #[doc = "x position 2 / Latitude 2"]
26765    pub p2x: f32,
26766    #[doc = "y position 2 / Longitude 2"]
26767    pub p2y: f32,
26768    #[doc = "z position 2 / Altitude 2"]
26769    pub p2z: f32,
26770    #[doc = "System ID"]
26771    pub target_system: u8,
26772    #[doc = "Component ID"]
26773    pub target_component: u8,
26774    #[doc = "Coordinate frame. Can be either global, GPS, right-handed with Z axis up or local, right handed, Z axis down."]
26775    pub frame: MavFrame,
26776}
26777impl SAFETY_SET_ALLOWED_AREA_DATA {
26778    pub const ENCODED_LEN: usize = 27usize;
26779    pub const DEFAULT: Self = Self {
26780        p1x: 0.0_f32,
26781        p1y: 0.0_f32,
26782        p1z: 0.0_f32,
26783        p2x: 0.0_f32,
26784        p2y: 0.0_f32,
26785        p2z: 0.0_f32,
26786        target_system: 0_u8,
26787        target_component: 0_u8,
26788        frame: MavFrame::DEFAULT,
26789    };
26790    #[cfg(feature = "arbitrary")]
26791    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26792        use arbitrary::{Arbitrary, Unstructured};
26793        let mut buf = [0u8; 1024];
26794        rng.fill_bytes(&mut buf);
26795        let mut unstructured = Unstructured::new(&buf);
26796        Self::arbitrary(&mut unstructured).unwrap_or_default()
26797    }
26798}
26799impl Default for SAFETY_SET_ALLOWED_AREA_DATA {
26800    fn default() -> Self {
26801        Self::DEFAULT.clone()
26802    }
26803}
26804impl MessageData for SAFETY_SET_ALLOWED_AREA_DATA {
26805    type Message = MavMessage;
26806    const ID: u32 = 54u32;
26807    const NAME: &'static str = "SAFETY_SET_ALLOWED_AREA";
26808    const EXTRA_CRC: u8 = 15u8;
26809    const ENCODED_LEN: usize = 27usize;
26810    fn deser(
26811        _version: MavlinkVersion,
26812        __input: &[u8],
26813    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26814        let avail_len = __input.len();
26815        let mut payload_buf = [0; Self::ENCODED_LEN];
26816        let mut buf = if avail_len < Self::ENCODED_LEN {
26817            payload_buf[0..avail_len].copy_from_slice(__input);
26818            Bytes::new(&payload_buf)
26819        } else {
26820            Bytes::new(__input)
26821        };
26822        let mut __struct = Self::default();
26823        __struct.p1x = buf.get_f32_le();
26824        __struct.p1y = buf.get_f32_le();
26825        __struct.p1z = buf.get_f32_le();
26826        __struct.p2x = buf.get_f32_le();
26827        __struct.p2y = buf.get_f32_le();
26828        __struct.p2z = buf.get_f32_le();
26829        __struct.target_system = buf.get_u8();
26830        __struct.target_component = buf.get_u8();
26831        let tmp = buf.get_u8();
26832        __struct.frame =
26833            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
26834                enum_type: "MavFrame",
26835                value: tmp as u32,
26836            })?;
26837        Ok(__struct)
26838    }
26839    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26840        let mut __tmp = BytesMut::new(bytes);
26841        #[allow(clippy::absurd_extreme_comparisons)]
26842        #[allow(unused_comparisons)]
26843        if __tmp.remaining() < Self::ENCODED_LEN {
26844            panic!(
26845                "buffer is too small (need {} bytes, but got {})",
26846                Self::ENCODED_LEN,
26847                __tmp.remaining(),
26848            )
26849        }
26850        __tmp.put_f32_le(self.p1x);
26851        __tmp.put_f32_le(self.p1y);
26852        __tmp.put_f32_le(self.p1z);
26853        __tmp.put_f32_le(self.p2x);
26854        __tmp.put_f32_le(self.p2y);
26855        __tmp.put_f32_le(self.p2z);
26856        __tmp.put_u8(self.target_system);
26857        __tmp.put_u8(self.target_component);
26858        __tmp.put_u8(self.frame as u8);
26859        if matches!(version, MavlinkVersion::V2) {
26860            let len = __tmp.len();
26861            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26862        } else {
26863            __tmp.len()
26864        }
26865    }
26866}
26867#[doc = "Status of the SatCom link."]
26868#[doc = ""]
26869#[doc = "ID: 8015"]
26870#[derive(Debug, Clone, PartialEq)]
26871#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26872#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26873pub struct SATCOM_LINK_STATUS_DATA {
26874    #[doc = "Timestamp"]
26875    pub timestamp: u64,
26876    #[doc = "Timestamp of the last successful sbd session"]
26877    pub last_heartbeat: u64,
26878    #[doc = "Number of failed sessions"]
26879    pub failed_sessions: u16,
26880    #[doc = "Number of successful sessions"]
26881    pub successful_sessions: u16,
26882    #[doc = "Signal quality"]
26883    pub signal_quality: u8,
26884    #[doc = "Ring call pending"]
26885    pub ring_pending: u8,
26886    #[doc = "Transmission session pending"]
26887    pub tx_session_pending: u8,
26888    #[doc = "Receiving session pending"]
26889    pub rx_session_pending: u8,
26890}
26891impl SATCOM_LINK_STATUS_DATA {
26892    pub const ENCODED_LEN: usize = 24usize;
26893    pub const DEFAULT: Self = Self {
26894        timestamp: 0_u64,
26895        last_heartbeat: 0_u64,
26896        failed_sessions: 0_u16,
26897        successful_sessions: 0_u16,
26898        signal_quality: 0_u8,
26899        ring_pending: 0_u8,
26900        tx_session_pending: 0_u8,
26901        rx_session_pending: 0_u8,
26902    };
26903    #[cfg(feature = "arbitrary")]
26904    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26905        use arbitrary::{Arbitrary, Unstructured};
26906        let mut buf = [0u8; 1024];
26907        rng.fill_bytes(&mut buf);
26908        let mut unstructured = Unstructured::new(&buf);
26909        Self::arbitrary(&mut unstructured).unwrap_or_default()
26910    }
26911}
26912impl Default for SATCOM_LINK_STATUS_DATA {
26913    fn default() -> Self {
26914        Self::DEFAULT.clone()
26915    }
26916}
26917impl MessageData for SATCOM_LINK_STATUS_DATA {
26918    type Message = MavMessage;
26919    const ID: u32 = 8015u32;
26920    const NAME: &'static str = "SATCOM_LINK_STATUS";
26921    const EXTRA_CRC: u8 = 23u8;
26922    const ENCODED_LEN: usize = 24usize;
26923    fn deser(
26924        _version: MavlinkVersion,
26925        __input: &[u8],
26926    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26927        let avail_len = __input.len();
26928        let mut payload_buf = [0; Self::ENCODED_LEN];
26929        let mut buf = if avail_len < Self::ENCODED_LEN {
26930            payload_buf[0..avail_len].copy_from_slice(__input);
26931            Bytes::new(&payload_buf)
26932        } else {
26933            Bytes::new(__input)
26934        };
26935        let mut __struct = Self::default();
26936        __struct.timestamp = buf.get_u64_le();
26937        __struct.last_heartbeat = buf.get_u64_le();
26938        __struct.failed_sessions = buf.get_u16_le();
26939        __struct.successful_sessions = buf.get_u16_le();
26940        __struct.signal_quality = buf.get_u8();
26941        __struct.ring_pending = buf.get_u8();
26942        __struct.tx_session_pending = buf.get_u8();
26943        __struct.rx_session_pending = buf.get_u8();
26944        Ok(__struct)
26945    }
26946    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26947        let mut __tmp = BytesMut::new(bytes);
26948        #[allow(clippy::absurd_extreme_comparisons)]
26949        #[allow(unused_comparisons)]
26950        if __tmp.remaining() < Self::ENCODED_LEN {
26951            panic!(
26952                "buffer is too small (need {} bytes, but got {})",
26953                Self::ENCODED_LEN,
26954                __tmp.remaining(),
26955            )
26956        }
26957        __tmp.put_u64_le(self.timestamp);
26958        __tmp.put_u64_le(self.last_heartbeat);
26959        __tmp.put_u16_le(self.failed_sessions);
26960        __tmp.put_u16_le(self.successful_sessions);
26961        __tmp.put_u8(self.signal_quality);
26962        __tmp.put_u8(self.ring_pending);
26963        __tmp.put_u8(self.tx_session_pending);
26964        __tmp.put_u8(self.rx_session_pending);
26965        if matches!(version, MavlinkVersion::V2) {
26966            let len = __tmp.len();
26967            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26968        } else {
26969            __tmp.len()
26970        }
26971    }
26972}
26973#[doc = "The RAW IMU readings for the usual 9DOF sensor setup. This message should contain the scaled values to the described units."]
26974#[doc = ""]
26975#[doc = "ID: 26"]
26976#[derive(Debug, Clone, PartialEq)]
26977#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26978#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26979pub struct SCALED_IMU_DATA {
26980    #[doc = "Timestamp (time since system boot)."]
26981    pub time_boot_ms: u32,
26982    #[doc = "X acceleration"]
26983    pub xacc: i16,
26984    #[doc = "Y acceleration"]
26985    pub yacc: i16,
26986    #[doc = "Z acceleration"]
26987    pub zacc: i16,
26988    #[doc = "Angular speed around X axis"]
26989    pub xgyro: i16,
26990    #[doc = "Angular speed around Y axis"]
26991    pub ygyro: i16,
26992    #[doc = "Angular speed around Z axis"]
26993    pub zgyro: i16,
26994    #[doc = "X Magnetic field"]
26995    pub xmag: i16,
26996    #[doc = "Y Magnetic field"]
26997    pub ymag: i16,
26998    #[doc = "Z Magnetic field"]
26999    pub zmag: i16,
27000    #[doc = "Temperature, 0: IMU does not provide temperature values. If the IMU is at 0C it must send 1 (0.01C)."]
27001    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27002    pub temperature: i16,
27003}
27004impl SCALED_IMU_DATA {
27005    pub const ENCODED_LEN: usize = 24usize;
27006    pub const DEFAULT: Self = Self {
27007        time_boot_ms: 0_u32,
27008        xacc: 0_i16,
27009        yacc: 0_i16,
27010        zacc: 0_i16,
27011        xgyro: 0_i16,
27012        ygyro: 0_i16,
27013        zgyro: 0_i16,
27014        xmag: 0_i16,
27015        ymag: 0_i16,
27016        zmag: 0_i16,
27017        temperature: 0_i16,
27018    };
27019    #[cfg(feature = "arbitrary")]
27020    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27021        use arbitrary::{Arbitrary, Unstructured};
27022        let mut buf = [0u8; 1024];
27023        rng.fill_bytes(&mut buf);
27024        let mut unstructured = Unstructured::new(&buf);
27025        Self::arbitrary(&mut unstructured).unwrap_or_default()
27026    }
27027}
27028impl Default for SCALED_IMU_DATA {
27029    fn default() -> Self {
27030        Self::DEFAULT.clone()
27031    }
27032}
27033impl MessageData for SCALED_IMU_DATA {
27034    type Message = MavMessage;
27035    const ID: u32 = 26u32;
27036    const NAME: &'static str = "SCALED_IMU";
27037    const EXTRA_CRC: u8 = 170u8;
27038    const ENCODED_LEN: usize = 24usize;
27039    fn deser(
27040        _version: MavlinkVersion,
27041        __input: &[u8],
27042    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27043        let avail_len = __input.len();
27044        let mut payload_buf = [0; Self::ENCODED_LEN];
27045        let mut buf = if avail_len < Self::ENCODED_LEN {
27046            payload_buf[0..avail_len].copy_from_slice(__input);
27047            Bytes::new(&payload_buf)
27048        } else {
27049            Bytes::new(__input)
27050        };
27051        let mut __struct = Self::default();
27052        __struct.time_boot_ms = buf.get_u32_le();
27053        __struct.xacc = buf.get_i16_le();
27054        __struct.yacc = buf.get_i16_le();
27055        __struct.zacc = buf.get_i16_le();
27056        __struct.xgyro = buf.get_i16_le();
27057        __struct.ygyro = buf.get_i16_le();
27058        __struct.zgyro = buf.get_i16_le();
27059        __struct.xmag = buf.get_i16_le();
27060        __struct.ymag = buf.get_i16_le();
27061        __struct.zmag = buf.get_i16_le();
27062        __struct.temperature = buf.get_i16_le();
27063        Ok(__struct)
27064    }
27065    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27066        let mut __tmp = BytesMut::new(bytes);
27067        #[allow(clippy::absurd_extreme_comparisons)]
27068        #[allow(unused_comparisons)]
27069        if __tmp.remaining() < Self::ENCODED_LEN {
27070            panic!(
27071                "buffer is too small (need {} bytes, but got {})",
27072                Self::ENCODED_LEN,
27073                __tmp.remaining(),
27074            )
27075        }
27076        __tmp.put_u32_le(self.time_boot_ms);
27077        __tmp.put_i16_le(self.xacc);
27078        __tmp.put_i16_le(self.yacc);
27079        __tmp.put_i16_le(self.zacc);
27080        __tmp.put_i16_le(self.xgyro);
27081        __tmp.put_i16_le(self.ygyro);
27082        __tmp.put_i16_le(self.zgyro);
27083        __tmp.put_i16_le(self.xmag);
27084        __tmp.put_i16_le(self.ymag);
27085        __tmp.put_i16_le(self.zmag);
27086        if matches!(version, MavlinkVersion::V2) {
27087            __tmp.put_i16_le(self.temperature);
27088            let len = __tmp.len();
27089            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27090        } else {
27091            __tmp.len()
27092        }
27093    }
27094}
27095#[doc = "The RAW IMU readings for secondary 9DOF sensor setup. This message should contain the scaled values to the described units."]
27096#[doc = ""]
27097#[doc = "ID: 116"]
27098#[derive(Debug, Clone, PartialEq)]
27099#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27100#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27101pub struct SCALED_IMU2_DATA {
27102    #[doc = "Timestamp (time since system boot)."]
27103    pub time_boot_ms: u32,
27104    #[doc = "X acceleration"]
27105    pub xacc: i16,
27106    #[doc = "Y acceleration"]
27107    pub yacc: i16,
27108    #[doc = "Z acceleration"]
27109    pub zacc: i16,
27110    #[doc = "Angular speed around X axis"]
27111    pub xgyro: i16,
27112    #[doc = "Angular speed around Y axis"]
27113    pub ygyro: i16,
27114    #[doc = "Angular speed around Z axis"]
27115    pub zgyro: i16,
27116    #[doc = "X Magnetic field"]
27117    pub xmag: i16,
27118    #[doc = "Y Magnetic field"]
27119    pub ymag: i16,
27120    #[doc = "Z Magnetic field"]
27121    pub zmag: i16,
27122    #[doc = "Temperature, 0: IMU does not provide temperature values. If the IMU is at 0C it must send 1 (0.01C)."]
27123    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27124    pub temperature: i16,
27125}
27126impl SCALED_IMU2_DATA {
27127    pub const ENCODED_LEN: usize = 24usize;
27128    pub const DEFAULT: Self = Self {
27129        time_boot_ms: 0_u32,
27130        xacc: 0_i16,
27131        yacc: 0_i16,
27132        zacc: 0_i16,
27133        xgyro: 0_i16,
27134        ygyro: 0_i16,
27135        zgyro: 0_i16,
27136        xmag: 0_i16,
27137        ymag: 0_i16,
27138        zmag: 0_i16,
27139        temperature: 0_i16,
27140    };
27141    #[cfg(feature = "arbitrary")]
27142    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27143        use arbitrary::{Arbitrary, Unstructured};
27144        let mut buf = [0u8; 1024];
27145        rng.fill_bytes(&mut buf);
27146        let mut unstructured = Unstructured::new(&buf);
27147        Self::arbitrary(&mut unstructured).unwrap_or_default()
27148    }
27149}
27150impl Default for SCALED_IMU2_DATA {
27151    fn default() -> Self {
27152        Self::DEFAULT.clone()
27153    }
27154}
27155impl MessageData for SCALED_IMU2_DATA {
27156    type Message = MavMessage;
27157    const ID: u32 = 116u32;
27158    const NAME: &'static str = "SCALED_IMU2";
27159    const EXTRA_CRC: u8 = 76u8;
27160    const ENCODED_LEN: usize = 24usize;
27161    fn deser(
27162        _version: MavlinkVersion,
27163        __input: &[u8],
27164    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27165        let avail_len = __input.len();
27166        let mut payload_buf = [0; Self::ENCODED_LEN];
27167        let mut buf = if avail_len < Self::ENCODED_LEN {
27168            payload_buf[0..avail_len].copy_from_slice(__input);
27169            Bytes::new(&payload_buf)
27170        } else {
27171            Bytes::new(__input)
27172        };
27173        let mut __struct = Self::default();
27174        __struct.time_boot_ms = buf.get_u32_le();
27175        __struct.xacc = buf.get_i16_le();
27176        __struct.yacc = buf.get_i16_le();
27177        __struct.zacc = buf.get_i16_le();
27178        __struct.xgyro = buf.get_i16_le();
27179        __struct.ygyro = buf.get_i16_le();
27180        __struct.zgyro = buf.get_i16_le();
27181        __struct.xmag = buf.get_i16_le();
27182        __struct.ymag = buf.get_i16_le();
27183        __struct.zmag = buf.get_i16_le();
27184        __struct.temperature = buf.get_i16_le();
27185        Ok(__struct)
27186    }
27187    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27188        let mut __tmp = BytesMut::new(bytes);
27189        #[allow(clippy::absurd_extreme_comparisons)]
27190        #[allow(unused_comparisons)]
27191        if __tmp.remaining() < Self::ENCODED_LEN {
27192            panic!(
27193                "buffer is too small (need {} bytes, but got {})",
27194                Self::ENCODED_LEN,
27195                __tmp.remaining(),
27196            )
27197        }
27198        __tmp.put_u32_le(self.time_boot_ms);
27199        __tmp.put_i16_le(self.xacc);
27200        __tmp.put_i16_le(self.yacc);
27201        __tmp.put_i16_le(self.zacc);
27202        __tmp.put_i16_le(self.xgyro);
27203        __tmp.put_i16_le(self.ygyro);
27204        __tmp.put_i16_le(self.zgyro);
27205        __tmp.put_i16_le(self.xmag);
27206        __tmp.put_i16_le(self.ymag);
27207        __tmp.put_i16_le(self.zmag);
27208        if matches!(version, MavlinkVersion::V2) {
27209            __tmp.put_i16_le(self.temperature);
27210            let len = __tmp.len();
27211            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27212        } else {
27213            __tmp.len()
27214        }
27215    }
27216}
27217#[doc = "The RAW IMU readings for 3rd 9DOF sensor setup. This message should contain the scaled values to the described units."]
27218#[doc = ""]
27219#[doc = "ID: 129"]
27220#[derive(Debug, Clone, PartialEq)]
27221#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27222#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27223pub struct SCALED_IMU3_DATA {
27224    #[doc = "Timestamp (time since system boot)."]
27225    pub time_boot_ms: u32,
27226    #[doc = "X acceleration"]
27227    pub xacc: i16,
27228    #[doc = "Y acceleration"]
27229    pub yacc: i16,
27230    #[doc = "Z acceleration"]
27231    pub zacc: i16,
27232    #[doc = "Angular speed around X axis"]
27233    pub xgyro: i16,
27234    #[doc = "Angular speed around Y axis"]
27235    pub ygyro: i16,
27236    #[doc = "Angular speed around Z axis"]
27237    pub zgyro: i16,
27238    #[doc = "X Magnetic field"]
27239    pub xmag: i16,
27240    #[doc = "Y Magnetic field"]
27241    pub ymag: i16,
27242    #[doc = "Z Magnetic field"]
27243    pub zmag: i16,
27244    #[doc = "Temperature, 0: IMU does not provide temperature values. If the IMU is at 0C it must send 1 (0.01C)."]
27245    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27246    pub temperature: i16,
27247}
27248impl SCALED_IMU3_DATA {
27249    pub const ENCODED_LEN: usize = 24usize;
27250    pub const DEFAULT: Self = Self {
27251        time_boot_ms: 0_u32,
27252        xacc: 0_i16,
27253        yacc: 0_i16,
27254        zacc: 0_i16,
27255        xgyro: 0_i16,
27256        ygyro: 0_i16,
27257        zgyro: 0_i16,
27258        xmag: 0_i16,
27259        ymag: 0_i16,
27260        zmag: 0_i16,
27261        temperature: 0_i16,
27262    };
27263    #[cfg(feature = "arbitrary")]
27264    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27265        use arbitrary::{Arbitrary, Unstructured};
27266        let mut buf = [0u8; 1024];
27267        rng.fill_bytes(&mut buf);
27268        let mut unstructured = Unstructured::new(&buf);
27269        Self::arbitrary(&mut unstructured).unwrap_or_default()
27270    }
27271}
27272impl Default for SCALED_IMU3_DATA {
27273    fn default() -> Self {
27274        Self::DEFAULT.clone()
27275    }
27276}
27277impl MessageData for SCALED_IMU3_DATA {
27278    type Message = MavMessage;
27279    const ID: u32 = 129u32;
27280    const NAME: &'static str = "SCALED_IMU3";
27281    const EXTRA_CRC: u8 = 46u8;
27282    const ENCODED_LEN: usize = 24usize;
27283    fn deser(
27284        _version: MavlinkVersion,
27285        __input: &[u8],
27286    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27287        let avail_len = __input.len();
27288        let mut payload_buf = [0; Self::ENCODED_LEN];
27289        let mut buf = if avail_len < Self::ENCODED_LEN {
27290            payload_buf[0..avail_len].copy_from_slice(__input);
27291            Bytes::new(&payload_buf)
27292        } else {
27293            Bytes::new(__input)
27294        };
27295        let mut __struct = Self::default();
27296        __struct.time_boot_ms = buf.get_u32_le();
27297        __struct.xacc = buf.get_i16_le();
27298        __struct.yacc = buf.get_i16_le();
27299        __struct.zacc = buf.get_i16_le();
27300        __struct.xgyro = buf.get_i16_le();
27301        __struct.ygyro = buf.get_i16_le();
27302        __struct.zgyro = buf.get_i16_le();
27303        __struct.xmag = buf.get_i16_le();
27304        __struct.ymag = buf.get_i16_le();
27305        __struct.zmag = buf.get_i16_le();
27306        __struct.temperature = buf.get_i16_le();
27307        Ok(__struct)
27308    }
27309    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27310        let mut __tmp = BytesMut::new(bytes);
27311        #[allow(clippy::absurd_extreme_comparisons)]
27312        #[allow(unused_comparisons)]
27313        if __tmp.remaining() < Self::ENCODED_LEN {
27314            panic!(
27315                "buffer is too small (need {} bytes, but got {})",
27316                Self::ENCODED_LEN,
27317                __tmp.remaining(),
27318            )
27319        }
27320        __tmp.put_u32_le(self.time_boot_ms);
27321        __tmp.put_i16_le(self.xacc);
27322        __tmp.put_i16_le(self.yacc);
27323        __tmp.put_i16_le(self.zacc);
27324        __tmp.put_i16_le(self.xgyro);
27325        __tmp.put_i16_le(self.ygyro);
27326        __tmp.put_i16_le(self.zgyro);
27327        __tmp.put_i16_le(self.xmag);
27328        __tmp.put_i16_le(self.ymag);
27329        __tmp.put_i16_le(self.zmag);
27330        if matches!(version, MavlinkVersion::V2) {
27331            __tmp.put_i16_le(self.temperature);
27332            let len = __tmp.len();
27333            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27334        } else {
27335            __tmp.len()
27336        }
27337    }
27338}
27339#[doc = "The pressure readings for the typical setup of one absolute and differential pressure sensor. The units are as specified in each field."]
27340#[doc = ""]
27341#[doc = "ID: 29"]
27342#[derive(Debug, Clone, PartialEq)]
27343#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27344#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27345pub struct SCALED_PRESSURE_DATA {
27346    #[doc = "Timestamp (time since system boot)."]
27347    pub time_boot_ms: u32,
27348    #[doc = "Absolute pressure"]
27349    pub press_abs: f32,
27350    #[doc = "Differential pressure 1"]
27351    pub press_diff: f32,
27352    #[doc = "Absolute pressure temperature"]
27353    pub temperature: i16,
27354    #[doc = "Differential pressure temperature (0, if not available). Report values of 0 (or 1) as 1 cdegC."]
27355    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27356    pub temperature_press_diff: i16,
27357}
27358impl SCALED_PRESSURE_DATA {
27359    pub const ENCODED_LEN: usize = 16usize;
27360    pub const DEFAULT: Self = Self {
27361        time_boot_ms: 0_u32,
27362        press_abs: 0.0_f32,
27363        press_diff: 0.0_f32,
27364        temperature: 0_i16,
27365        temperature_press_diff: 0_i16,
27366    };
27367    #[cfg(feature = "arbitrary")]
27368    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27369        use arbitrary::{Arbitrary, Unstructured};
27370        let mut buf = [0u8; 1024];
27371        rng.fill_bytes(&mut buf);
27372        let mut unstructured = Unstructured::new(&buf);
27373        Self::arbitrary(&mut unstructured).unwrap_or_default()
27374    }
27375}
27376impl Default for SCALED_PRESSURE_DATA {
27377    fn default() -> Self {
27378        Self::DEFAULT.clone()
27379    }
27380}
27381impl MessageData for SCALED_PRESSURE_DATA {
27382    type Message = MavMessage;
27383    const ID: u32 = 29u32;
27384    const NAME: &'static str = "SCALED_PRESSURE";
27385    const EXTRA_CRC: u8 = 115u8;
27386    const ENCODED_LEN: usize = 16usize;
27387    fn deser(
27388        _version: MavlinkVersion,
27389        __input: &[u8],
27390    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27391        let avail_len = __input.len();
27392        let mut payload_buf = [0; Self::ENCODED_LEN];
27393        let mut buf = if avail_len < Self::ENCODED_LEN {
27394            payload_buf[0..avail_len].copy_from_slice(__input);
27395            Bytes::new(&payload_buf)
27396        } else {
27397            Bytes::new(__input)
27398        };
27399        let mut __struct = Self::default();
27400        __struct.time_boot_ms = buf.get_u32_le();
27401        __struct.press_abs = buf.get_f32_le();
27402        __struct.press_diff = buf.get_f32_le();
27403        __struct.temperature = buf.get_i16_le();
27404        __struct.temperature_press_diff = buf.get_i16_le();
27405        Ok(__struct)
27406    }
27407    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27408        let mut __tmp = BytesMut::new(bytes);
27409        #[allow(clippy::absurd_extreme_comparisons)]
27410        #[allow(unused_comparisons)]
27411        if __tmp.remaining() < Self::ENCODED_LEN {
27412            panic!(
27413                "buffer is too small (need {} bytes, but got {})",
27414                Self::ENCODED_LEN,
27415                __tmp.remaining(),
27416            )
27417        }
27418        __tmp.put_u32_le(self.time_boot_ms);
27419        __tmp.put_f32_le(self.press_abs);
27420        __tmp.put_f32_le(self.press_diff);
27421        __tmp.put_i16_le(self.temperature);
27422        if matches!(version, MavlinkVersion::V2) {
27423            __tmp.put_i16_le(self.temperature_press_diff);
27424            let len = __tmp.len();
27425            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27426        } else {
27427            __tmp.len()
27428        }
27429    }
27430}
27431#[doc = "Barometer readings for 2nd barometer."]
27432#[doc = ""]
27433#[doc = "ID: 137"]
27434#[derive(Debug, Clone, PartialEq)]
27435#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27436#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27437pub struct SCALED_PRESSURE2_DATA {
27438    #[doc = "Timestamp (time since system boot)."]
27439    pub time_boot_ms: u32,
27440    #[doc = "Absolute pressure"]
27441    pub press_abs: f32,
27442    #[doc = "Differential pressure"]
27443    pub press_diff: f32,
27444    #[doc = "Absolute pressure temperature"]
27445    pub temperature: i16,
27446    #[doc = "Differential pressure temperature (0, if not available). Report values of 0 (or 1) as 1 cdegC."]
27447    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27448    pub temperature_press_diff: i16,
27449}
27450impl SCALED_PRESSURE2_DATA {
27451    pub const ENCODED_LEN: usize = 16usize;
27452    pub const DEFAULT: Self = Self {
27453        time_boot_ms: 0_u32,
27454        press_abs: 0.0_f32,
27455        press_diff: 0.0_f32,
27456        temperature: 0_i16,
27457        temperature_press_diff: 0_i16,
27458    };
27459    #[cfg(feature = "arbitrary")]
27460    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27461        use arbitrary::{Arbitrary, Unstructured};
27462        let mut buf = [0u8; 1024];
27463        rng.fill_bytes(&mut buf);
27464        let mut unstructured = Unstructured::new(&buf);
27465        Self::arbitrary(&mut unstructured).unwrap_or_default()
27466    }
27467}
27468impl Default for SCALED_PRESSURE2_DATA {
27469    fn default() -> Self {
27470        Self::DEFAULT.clone()
27471    }
27472}
27473impl MessageData for SCALED_PRESSURE2_DATA {
27474    type Message = MavMessage;
27475    const ID: u32 = 137u32;
27476    const NAME: &'static str = "SCALED_PRESSURE2";
27477    const EXTRA_CRC: u8 = 195u8;
27478    const ENCODED_LEN: usize = 16usize;
27479    fn deser(
27480        _version: MavlinkVersion,
27481        __input: &[u8],
27482    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27483        let avail_len = __input.len();
27484        let mut payload_buf = [0; Self::ENCODED_LEN];
27485        let mut buf = if avail_len < Self::ENCODED_LEN {
27486            payload_buf[0..avail_len].copy_from_slice(__input);
27487            Bytes::new(&payload_buf)
27488        } else {
27489            Bytes::new(__input)
27490        };
27491        let mut __struct = Self::default();
27492        __struct.time_boot_ms = buf.get_u32_le();
27493        __struct.press_abs = buf.get_f32_le();
27494        __struct.press_diff = buf.get_f32_le();
27495        __struct.temperature = buf.get_i16_le();
27496        __struct.temperature_press_diff = buf.get_i16_le();
27497        Ok(__struct)
27498    }
27499    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27500        let mut __tmp = BytesMut::new(bytes);
27501        #[allow(clippy::absurd_extreme_comparisons)]
27502        #[allow(unused_comparisons)]
27503        if __tmp.remaining() < Self::ENCODED_LEN {
27504            panic!(
27505                "buffer is too small (need {} bytes, but got {})",
27506                Self::ENCODED_LEN,
27507                __tmp.remaining(),
27508            )
27509        }
27510        __tmp.put_u32_le(self.time_boot_ms);
27511        __tmp.put_f32_le(self.press_abs);
27512        __tmp.put_f32_le(self.press_diff);
27513        __tmp.put_i16_le(self.temperature);
27514        if matches!(version, MavlinkVersion::V2) {
27515            __tmp.put_i16_le(self.temperature_press_diff);
27516            let len = __tmp.len();
27517            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27518        } else {
27519            __tmp.len()
27520        }
27521    }
27522}
27523#[doc = "Barometer readings for 3rd barometer."]
27524#[doc = ""]
27525#[doc = "ID: 143"]
27526#[derive(Debug, Clone, PartialEq)]
27527#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27528#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27529pub struct SCALED_PRESSURE3_DATA {
27530    #[doc = "Timestamp (time since system boot)."]
27531    pub time_boot_ms: u32,
27532    #[doc = "Absolute pressure"]
27533    pub press_abs: f32,
27534    #[doc = "Differential pressure"]
27535    pub press_diff: f32,
27536    #[doc = "Absolute pressure temperature"]
27537    pub temperature: i16,
27538    #[doc = "Differential pressure temperature (0, if not available). Report values of 0 (or 1) as 1 cdegC."]
27539    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27540    pub temperature_press_diff: i16,
27541}
27542impl SCALED_PRESSURE3_DATA {
27543    pub const ENCODED_LEN: usize = 16usize;
27544    pub const DEFAULT: Self = Self {
27545        time_boot_ms: 0_u32,
27546        press_abs: 0.0_f32,
27547        press_diff: 0.0_f32,
27548        temperature: 0_i16,
27549        temperature_press_diff: 0_i16,
27550    };
27551    #[cfg(feature = "arbitrary")]
27552    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27553        use arbitrary::{Arbitrary, Unstructured};
27554        let mut buf = [0u8; 1024];
27555        rng.fill_bytes(&mut buf);
27556        let mut unstructured = Unstructured::new(&buf);
27557        Self::arbitrary(&mut unstructured).unwrap_or_default()
27558    }
27559}
27560impl Default for SCALED_PRESSURE3_DATA {
27561    fn default() -> Self {
27562        Self::DEFAULT.clone()
27563    }
27564}
27565impl MessageData for SCALED_PRESSURE3_DATA {
27566    type Message = MavMessage;
27567    const ID: u32 = 143u32;
27568    const NAME: &'static str = "SCALED_PRESSURE3";
27569    const EXTRA_CRC: u8 = 131u8;
27570    const ENCODED_LEN: usize = 16usize;
27571    fn deser(
27572        _version: MavlinkVersion,
27573        __input: &[u8],
27574    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27575        let avail_len = __input.len();
27576        let mut payload_buf = [0; Self::ENCODED_LEN];
27577        let mut buf = if avail_len < Self::ENCODED_LEN {
27578            payload_buf[0..avail_len].copy_from_slice(__input);
27579            Bytes::new(&payload_buf)
27580        } else {
27581            Bytes::new(__input)
27582        };
27583        let mut __struct = Self::default();
27584        __struct.time_boot_ms = buf.get_u32_le();
27585        __struct.press_abs = buf.get_f32_le();
27586        __struct.press_diff = buf.get_f32_le();
27587        __struct.temperature = buf.get_i16_le();
27588        __struct.temperature_press_diff = buf.get_i16_le();
27589        Ok(__struct)
27590    }
27591    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27592        let mut __tmp = BytesMut::new(bytes);
27593        #[allow(clippy::absurd_extreme_comparisons)]
27594        #[allow(unused_comparisons)]
27595        if __tmp.remaining() < Self::ENCODED_LEN {
27596            panic!(
27597                "buffer is too small (need {} bytes, but got {})",
27598                Self::ENCODED_LEN,
27599                __tmp.remaining(),
27600            )
27601        }
27602        __tmp.put_u32_le(self.time_boot_ms);
27603        __tmp.put_f32_le(self.press_abs);
27604        __tmp.put_f32_le(self.press_diff);
27605        __tmp.put_i16_le(self.temperature);
27606        if matches!(version, MavlinkVersion::V2) {
27607            __tmp.put_i16_le(self.temperature_press_diff);
27608            let len = __tmp.len();
27609            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27610        } else {
27611            __tmp.len()
27612        }
27613    }
27614}
27615#[doc = "Monitoring of sensorpod status."]
27616#[doc = ""]
27617#[doc = "ID: 8012"]
27618#[derive(Debug, Clone, PartialEq)]
27619#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27620#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27621pub struct SENSORPOD_STATUS_DATA {
27622    #[doc = "Timestamp in linuxtime (since 1.1.1970)"]
27623    pub timestamp: u64,
27624    #[doc = "Free space available in recordings directory in [Gb] * 1e2"]
27625    pub free_space: u16,
27626    #[doc = "Rate of ROS topic 1"]
27627    pub visensor_rate_1: u8,
27628    #[doc = "Rate of ROS topic 2"]
27629    pub visensor_rate_2: u8,
27630    #[doc = "Rate of ROS topic 3"]
27631    pub visensor_rate_3: u8,
27632    #[doc = "Rate of ROS topic 4"]
27633    pub visensor_rate_4: u8,
27634    #[doc = "Number of recording nodes"]
27635    pub recording_nodes_count: u8,
27636    #[doc = "Temperature of sensorpod CPU in"]
27637    pub cpu_temp: u8,
27638}
27639impl SENSORPOD_STATUS_DATA {
27640    pub const ENCODED_LEN: usize = 16usize;
27641    pub const DEFAULT: Self = Self {
27642        timestamp: 0_u64,
27643        free_space: 0_u16,
27644        visensor_rate_1: 0_u8,
27645        visensor_rate_2: 0_u8,
27646        visensor_rate_3: 0_u8,
27647        visensor_rate_4: 0_u8,
27648        recording_nodes_count: 0_u8,
27649        cpu_temp: 0_u8,
27650    };
27651    #[cfg(feature = "arbitrary")]
27652    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27653        use arbitrary::{Arbitrary, Unstructured};
27654        let mut buf = [0u8; 1024];
27655        rng.fill_bytes(&mut buf);
27656        let mut unstructured = Unstructured::new(&buf);
27657        Self::arbitrary(&mut unstructured).unwrap_or_default()
27658    }
27659}
27660impl Default for SENSORPOD_STATUS_DATA {
27661    fn default() -> Self {
27662        Self::DEFAULT.clone()
27663    }
27664}
27665impl MessageData for SENSORPOD_STATUS_DATA {
27666    type Message = MavMessage;
27667    const ID: u32 = 8012u32;
27668    const NAME: &'static str = "SENSORPOD_STATUS";
27669    const EXTRA_CRC: u8 = 54u8;
27670    const ENCODED_LEN: usize = 16usize;
27671    fn deser(
27672        _version: MavlinkVersion,
27673        __input: &[u8],
27674    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27675        let avail_len = __input.len();
27676        let mut payload_buf = [0; Self::ENCODED_LEN];
27677        let mut buf = if avail_len < Self::ENCODED_LEN {
27678            payload_buf[0..avail_len].copy_from_slice(__input);
27679            Bytes::new(&payload_buf)
27680        } else {
27681            Bytes::new(__input)
27682        };
27683        let mut __struct = Self::default();
27684        __struct.timestamp = buf.get_u64_le();
27685        __struct.free_space = buf.get_u16_le();
27686        __struct.visensor_rate_1 = buf.get_u8();
27687        __struct.visensor_rate_2 = buf.get_u8();
27688        __struct.visensor_rate_3 = buf.get_u8();
27689        __struct.visensor_rate_4 = buf.get_u8();
27690        __struct.recording_nodes_count = buf.get_u8();
27691        __struct.cpu_temp = buf.get_u8();
27692        Ok(__struct)
27693    }
27694    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27695        let mut __tmp = BytesMut::new(bytes);
27696        #[allow(clippy::absurd_extreme_comparisons)]
27697        #[allow(unused_comparisons)]
27698        if __tmp.remaining() < Self::ENCODED_LEN {
27699            panic!(
27700                "buffer is too small (need {} bytes, but got {})",
27701                Self::ENCODED_LEN,
27702                __tmp.remaining(),
27703            )
27704        }
27705        __tmp.put_u64_le(self.timestamp);
27706        __tmp.put_u16_le(self.free_space);
27707        __tmp.put_u8(self.visensor_rate_1);
27708        __tmp.put_u8(self.visensor_rate_2);
27709        __tmp.put_u8(self.visensor_rate_3);
27710        __tmp.put_u8(self.visensor_rate_4);
27711        __tmp.put_u8(self.recording_nodes_count);
27712        __tmp.put_u8(self.cpu_temp);
27713        if matches!(version, MavlinkVersion::V2) {
27714            let len = __tmp.len();
27715            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27716        } else {
27717            __tmp.len()
27718        }
27719    }
27720}
27721#[doc = "Calibrated airflow angle measurements."]
27722#[doc = ""]
27723#[doc = "ID: 8016"]
27724#[derive(Debug, Clone, PartialEq)]
27725#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27726#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27727pub struct SENSOR_AIRFLOW_ANGLES_DATA {
27728    #[doc = "Timestamp"]
27729    pub timestamp: u64,
27730    #[doc = "Angle of attack"]
27731    pub angleofattack: f32,
27732    #[doc = "Sideslip angle"]
27733    pub sideslip: f32,
27734    #[doc = "Angle of attack measurement valid"]
27735    pub angleofattack_valid: u8,
27736    #[doc = "Sideslip angle measurement valid"]
27737    pub sideslip_valid: u8,
27738}
27739impl SENSOR_AIRFLOW_ANGLES_DATA {
27740    pub const ENCODED_LEN: usize = 18usize;
27741    pub const DEFAULT: Self = Self {
27742        timestamp: 0_u64,
27743        angleofattack: 0.0_f32,
27744        sideslip: 0.0_f32,
27745        angleofattack_valid: 0_u8,
27746        sideslip_valid: 0_u8,
27747    };
27748    #[cfg(feature = "arbitrary")]
27749    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27750        use arbitrary::{Arbitrary, Unstructured};
27751        let mut buf = [0u8; 1024];
27752        rng.fill_bytes(&mut buf);
27753        let mut unstructured = Unstructured::new(&buf);
27754        Self::arbitrary(&mut unstructured).unwrap_or_default()
27755    }
27756}
27757impl Default for SENSOR_AIRFLOW_ANGLES_DATA {
27758    fn default() -> Self {
27759        Self::DEFAULT.clone()
27760    }
27761}
27762impl MessageData for SENSOR_AIRFLOW_ANGLES_DATA {
27763    type Message = MavMessage;
27764    const ID: u32 = 8016u32;
27765    const NAME: &'static str = "SENSOR_AIRFLOW_ANGLES";
27766    const EXTRA_CRC: u8 = 149u8;
27767    const ENCODED_LEN: usize = 18usize;
27768    fn deser(
27769        _version: MavlinkVersion,
27770        __input: &[u8],
27771    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27772        let avail_len = __input.len();
27773        let mut payload_buf = [0; Self::ENCODED_LEN];
27774        let mut buf = if avail_len < Self::ENCODED_LEN {
27775            payload_buf[0..avail_len].copy_from_slice(__input);
27776            Bytes::new(&payload_buf)
27777        } else {
27778            Bytes::new(__input)
27779        };
27780        let mut __struct = Self::default();
27781        __struct.timestamp = buf.get_u64_le();
27782        __struct.angleofattack = buf.get_f32_le();
27783        __struct.sideslip = buf.get_f32_le();
27784        __struct.angleofattack_valid = buf.get_u8();
27785        __struct.sideslip_valid = buf.get_u8();
27786        Ok(__struct)
27787    }
27788    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27789        let mut __tmp = BytesMut::new(bytes);
27790        #[allow(clippy::absurd_extreme_comparisons)]
27791        #[allow(unused_comparisons)]
27792        if __tmp.remaining() < Self::ENCODED_LEN {
27793            panic!(
27794                "buffer is too small (need {} bytes, but got {})",
27795                Self::ENCODED_LEN,
27796                __tmp.remaining(),
27797            )
27798        }
27799        __tmp.put_u64_le(self.timestamp);
27800        __tmp.put_f32_le(self.angleofattack);
27801        __tmp.put_f32_le(self.sideslip);
27802        __tmp.put_u8(self.angleofattack_valid);
27803        __tmp.put_u8(self.sideslip_valid);
27804        if matches!(version, MavlinkVersion::V2) {
27805            let len = __tmp.len();
27806            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27807        } else {
27808            __tmp.len()
27809        }
27810    }
27811}
27812#[doc = "Atmospheric sensors (temperature, humidity, ...)."]
27813#[doc = ""]
27814#[doc = "ID: 8009"]
27815#[derive(Debug, Clone, PartialEq)]
27816#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27817#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27818pub struct SENS_ATMOS_DATA {
27819    #[doc = "Time since system boot"]
27820    pub timestamp: u64,
27821    #[doc = "Ambient temperature"]
27822    pub TempAmbient: f32,
27823    #[doc = "Relative humidity"]
27824    pub Humidity: f32,
27825}
27826impl SENS_ATMOS_DATA {
27827    pub const ENCODED_LEN: usize = 16usize;
27828    pub const DEFAULT: Self = Self {
27829        timestamp: 0_u64,
27830        TempAmbient: 0.0_f32,
27831        Humidity: 0.0_f32,
27832    };
27833    #[cfg(feature = "arbitrary")]
27834    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27835        use arbitrary::{Arbitrary, Unstructured};
27836        let mut buf = [0u8; 1024];
27837        rng.fill_bytes(&mut buf);
27838        let mut unstructured = Unstructured::new(&buf);
27839        Self::arbitrary(&mut unstructured).unwrap_or_default()
27840    }
27841}
27842impl Default for SENS_ATMOS_DATA {
27843    fn default() -> Self {
27844        Self::DEFAULT.clone()
27845    }
27846}
27847impl MessageData for SENS_ATMOS_DATA {
27848    type Message = MavMessage;
27849    const ID: u32 = 8009u32;
27850    const NAME: &'static str = "SENS_ATMOS";
27851    const EXTRA_CRC: u8 = 144u8;
27852    const ENCODED_LEN: usize = 16usize;
27853    fn deser(
27854        _version: MavlinkVersion,
27855        __input: &[u8],
27856    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27857        let avail_len = __input.len();
27858        let mut payload_buf = [0; Self::ENCODED_LEN];
27859        let mut buf = if avail_len < Self::ENCODED_LEN {
27860            payload_buf[0..avail_len].copy_from_slice(__input);
27861            Bytes::new(&payload_buf)
27862        } else {
27863            Bytes::new(__input)
27864        };
27865        let mut __struct = Self::default();
27866        __struct.timestamp = buf.get_u64_le();
27867        __struct.TempAmbient = buf.get_f32_le();
27868        __struct.Humidity = buf.get_f32_le();
27869        Ok(__struct)
27870    }
27871    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27872        let mut __tmp = BytesMut::new(bytes);
27873        #[allow(clippy::absurd_extreme_comparisons)]
27874        #[allow(unused_comparisons)]
27875        if __tmp.remaining() < Self::ENCODED_LEN {
27876            panic!(
27877                "buffer is too small (need {} bytes, but got {})",
27878                Self::ENCODED_LEN,
27879                __tmp.remaining(),
27880            )
27881        }
27882        __tmp.put_u64_le(self.timestamp);
27883        __tmp.put_f32_le(self.TempAmbient);
27884        __tmp.put_f32_le(self.Humidity);
27885        if matches!(version, MavlinkVersion::V2) {
27886            let len = __tmp.len();
27887            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27888        } else {
27889            __tmp.len()
27890        }
27891    }
27892}
27893#[doc = "Battery pack monitoring data for Li-Ion batteries."]
27894#[doc = ""]
27895#[doc = "ID: 8010"]
27896#[derive(Debug, Clone, PartialEq)]
27897#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27898#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27899pub struct SENS_BATMON_DATA {
27900    #[doc = "Time since system start"]
27901    pub batmon_timestamp: u64,
27902    #[doc = "Battery pack temperature"]
27903    pub temperature: f32,
27904    #[doc = "Battery monitor safetystatus report bits in Hex"]
27905    pub safetystatus: u32,
27906    #[doc = "Battery monitor operation status report bits in Hex"]
27907    pub operationstatus: u32,
27908    #[doc = "Battery pack voltage"]
27909    pub voltage: u16,
27910    #[doc = "Battery pack current"]
27911    pub current: i16,
27912    #[doc = "Battery monitor status report bits in Hex"]
27913    pub batterystatus: u16,
27914    #[doc = "Battery monitor serial number in Hex"]
27915    pub serialnumber: u16,
27916    #[doc = "Battery pack cell 1 voltage"]
27917    pub cellvoltage1: u16,
27918    #[doc = "Battery pack cell 2 voltage"]
27919    pub cellvoltage2: u16,
27920    #[doc = "Battery pack cell 3 voltage"]
27921    pub cellvoltage3: u16,
27922    #[doc = "Battery pack cell 4 voltage"]
27923    pub cellvoltage4: u16,
27924    #[doc = "Battery pack cell 5 voltage"]
27925    pub cellvoltage5: u16,
27926    #[doc = "Battery pack cell 6 voltage"]
27927    pub cellvoltage6: u16,
27928    #[doc = "Battery pack state-of-charge"]
27929    pub SoC: u8,
27930}
27931impl SENS_BATMON_DATA {
27932    pub const ENCODED_LEN: usize = 41usize;
27933    pub const DEFAULT: Self = Self {
27934        batmon_timestamp: 0_u64,
27935        temperature: 0.0_f32,
27936        safetystatus: 0_u32,
27937        operationstatus: 0_u32,
27938        voltage: 0_u16,
27939        current: 0_i16,
27940        batterystatus: 0_u16,
27941        serialnumber: 0_u16,
27942        cellvoltage1: 0_u16,
27943        cellvoltage2: 0_u16,
27944        cellvoltage3: 0_u16,
27945        cellvoltage4: 0_u16,
27946        cellvoltage5: 0_u16,
27947        cellvoltage6: 0_u16,
27948        SoC: 0_u8,
27949    };
27950    #[cfg(feature = "arbitrary")]
27951    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27952        use arbitrary::{Arbitrary, Unstructured};
27953        let mut buf = [0u8; 1024];
27954        rng.fill_bytes(&mut buf);
27955        let mut unstructured = Unstructured::new(&buf);
27956        Self::arbitrary(&mut unstructured).unwrap_or_default()
27957    }
27958}
27959impl Default for SENS_BATMON_DATA {
27960    fn default() -> Self {
27961        Self::DEFAULT.clone()
27962    }
27963}
27964impl MessageData for SENS_BATMON_DATA {
27965    type Message = MavMessage;
27966    const ID: u32 = 8010u32;
27967    const NAME: &'static str = "SENS_BATMON";
27968    const EXTRA_CRC: u8 = 155u8;
27969    const ENCODED_LEN: usize = 41usize;
27970    fn deser(
27971        _version: MavlinkVersion,
27972        __input: &[u8],
27973    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27974        let avail_len = __input.len();
27975        let mut payload_buf = [0; Self::ENCODED_LEN];
27976        let mut buf = if avail_len < Self::ENCODED_LEN {
27977            payload_buf[0..avail_len].copy_from_slice(__input);
27978            Bytes::new(&payload_buf)
27979        } else {
27980            Bytes::new(__input)
27981        };
27982        let mut __struct = Self::default();
27983        __struct.batmon_timestamp = buf.get_u64_le();
27984        __struct.temperature = buf.get_f32_le();
27985        __struct.safetystatus = buf.get_u32_le();
27986        __struct.operationstatus = buf.get_u32_le();
27987        __struct.voltage = buf.get_u16_le();
27988        __struct.current = buf.get_i16_le();
27989        __struct.batterystatus = buf.get_u16_le();
27990        __struct.serialnumber = buf.get_u16_le();
27991        __struct.cellvoltage1 = buf.get_u16_le();
27992        __struct.cellvoltage2 = buf.get_u16_le();
27993        __struct.cellvoltage3 = buf.get_u16_le();
27994        __struct.cellvoltage4 = buf.get_u16_le();
27995        __struct.cellvoltage5 = buf.get_u16_le();
27996        __struct.cellvoltage6 = buf.get_u16_le();
27997        __struct.SoC = buf.get_u8();
27998        Ok(__struct)
27999    }
28000    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28001        let mut __tmp = BytesMut::new(bytes);
28002        #[allow(clippy::absurd_extreme_comparisons)]
28003        #[allow(unused_comparisons)]
28004        if __tmp.remaining() < Self::ENCODED_LEN {
28005            panic!(
28006                "buffer is too small (need {} bytes, but got {})",
28007                Self::ENCODED_LEN,
28008                __tmp.remaining(),
28009            )
28010        }
28011        __tmp.put_u64_le(self.batmon_timestamp);
28012        __tmp.put_f32_le(self.temperature);
28013        __tmp.put_u32_le(self.safetystatus);
28014        __tmp.put_u32_le(self.operationstatus);
28015        __tmp.put_u16_le(self.voltage);
28016        __tmp.put_i16_le(self.current);
28017        __tmp.put_u16_le(self.batterystatus);
28018        __tmp.put_u16_le(self.serialnumber);
28019        __tmp.put_u16_le(self.cellvoltage1);
28020        __tmp.put_u16_le(self.cellvoltage2);
28021        __tmp.put_u16_le(self.cellvoltage3);
28022        __tmp.put_u16_le(self.cellvoltage4);
28023        __tmp.put_u16_le(self.cellvoltage5);
28024        __tmp.put_u16_le(self.cellvoltage6);
28025        __tmp.put_u8(self.SoC);
28026        if matches!(version, MavlinkVersion::V2) {
28027            let len = __tmp.len();
28028            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28029        } else {
28030            __tmp.len()
28031        }
28032    }
28033}
28034#[doc = "Maximum Power Point Tracker (MPPT) sensor data for solar module power performance tracking."]
28035#[doc = ""]
28036#[doc = "ID: 8003"]
28037#[derive(Debug, Clone, PartialEq)]
28038#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28039#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28040pub struct SENS_MPPT_DATA {
28041    #[doc = "MPPT last timestamp"]
28042    pub mppt_timestamp: u64,
28043    #[doc = "MPPT1 voltage"]
28044    pub mppt1_volt: f32,
28045    #[doc = "MPPT1 current"]
28046    pub mppt1_amp: f32,
28047    #[doc = "MPPT2 voltage"]
28048    pub mppt2_volt: f32,
28049    #[doc = "MPPT2 current"]
28050    pub mppt2_amp: f32,
28051    #[doc = "MPPT3 voltage"]
28052    pub mppt3_volt: f32,
28053    #[doc = "MPPT3 current"]
28054    pub mppt3_amp: f32,
28055    #[doc = "MPPT1 pwm"]
28056    pub mppt1_pwm: u16,
28057    #[doc = "MPPT2 pwm"]
28058    pub mppt2_pwm: u16,
28059    #[doc = "MPPT3 pwm"]
28060    pub mppt3_pwm: u16,
28061    #[doc = "MPPT1 status"]
28062    pub mppt1_status: u8,
28063    #[doc = "MPPT2 status"]
28064    pub mppt2_status: u8,
28065    #[doc = "MPPT3 status"]
28066    pub mppt3_status: u8,
28067}
28068impl SENS_MPPT_DATA {
28069    pub const ENCODED_LEN: usize = 41usize;
28070    pub const DEFAULT: Self = Self {
28071        mppt_timestamp: 0_u64,
28072        mppt1_volt: 0.0_f32,
28073        mppt1_amp: 0.0_f32,
28074        mppt2_volt: 0.0_f32,
28075        mppt2_amp: 0.0_f32,
28076        mppt3_volt: 0.0_f32,
28077        mppt3_amp: 0.0_f32,
28078        mppt1_pwm: 0_u16,
28079        mppt2_pwm: 0_u16,
28080        mppt3_pwm: 0_u16,
28081        mppt1_status: 0_u8,
28082        mppt2_status: 0_u8,
28083        mppt3_status: 0_u8,
28084    };
28085    #[cfg(feature = "arbitrary")]
28086    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28087        use arbitrary::{Arbitrary, Unstructured};
28088        let mut buf = [0u8; 1024];
28089        rng.fill_bytes(&mut buf);
28090        let mut unstructured = Unstructured::new(&buf);
28091        Self::arbitrary(&mut unstructured).unwrap_or_default()
28092    }
28093}
28094impl Default for SENS_MPPT_DATA {
28095    fn default() -> Self {
28096        Self::DEFAULT.clone()
28097    }
28098}
28099impl MessageData for SENS_MPPT_DATA {
28100    type Message = MavMessage;
28101    const ID: u32 = 8003u32;
28102    const NAME: &'static str = "SENS_MPPT";
28103    const EXTRA_CRC: u8 = 231u8;
28104    const ENCODED_LEN: usize = 41usize;
28105    fn deser(
28106        _version: MavlinkVersion,
28107        __input: &[u8],
28108    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28109        let avail_len = __input.len();
28110        let mut payload_buf = [0; Self::ENCODED_LEN];
28111        let mut buf = if avail_len < Self::ENCODED_LEN {
28112            payload_buf[0..avail_len].copy_from_slice(__input);
28113            Bytes::new(&payload_buf)
28114        } else {
28115            Bytes::new(__input)
28116        };
28117        let mut __struct = Self::default();
28118        __struct.mppt_timestamp = buf.get_u64_le();
28119        __struct.mppt1_volt = buf.get_f32_le();
28120        __struct.mppt1_amp = buf.get_f32_le();
28121        __struct.mppt2_volt = buf.get_f32_le();
28122        __struct.mppt2_amp = buf.get_f32_le();
28123        __struct.mppt3_volt = buf.get_f32_le();
28124        __struct.mppt3_amp = buf.get_f32_le();
28125        __struct.mppt1_pwm = buf.get_u16_le();
28126        __struct.mppt2_pwm = buf.get_u16_le();
28127        __struct.mppt3_pwm = buf.get_u16_le();
28128        __struct.mppt1_status = buf.get_u8();
28129        __struct.mppt2_status = buf.get_u8();
28130        __struct.mppt3_status = buf.get_u8();
28131        Ok(__struct)
28132    }
28133    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28134        let mut __tmp = BytesMut::new(bytes);
28135        #[allow(clippy::absurd_extreme_comparisons)]
28136        #[allow(unused_comparisons)]
28137        if __tmp.remaining() < Self::ENCODED_LEN {
28138            panic!(
28139                "buffer is too small (need {} bytes, but got {})",
28140                Self::ENCODED_LEN,
28141                __tmp.remaining(),
28142            )
28143        }
28144        __tmp.put_u64_le(self.mppt_timestamp);
28145        __tmp.put_f32_le(self.mppt1_volt);
28146        __tmp.put_f32_le(self.mppt1_amp);
28147        __tmp.put_f32_le(self.mppt2_volt);
28148        __tmp.put_f32_le(self.mppt2_amp);
28149        __tmp.put_f32_le(self.mppt3_volt);
28150        __tmp.put_f32_le(self.mppt3_amp);
28151        __tmp.put_u16_le(self.mppt1_pwm);
28152        __tmp.put_u16_le(self.mppt2_pwm);
28153        __tmp.put_u16_le(self.mppt3_pwm);
28154        __tmp.put_u8(self.mppt1_status);
28155        __tmp.put_u8(self.mppt2_status);
28156        __tmp.put_u8(self.mppt3_status);
28157        if matches!(version, MavlinkVersion::V2) {
28158            let len = __tmp.len();
28159            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28160        } else {
28161            __tmp.len()
28162        }
28163    }
28164}
28165#[doc = "Voltage and current sensor data."]
28166#[doc = ""]
28167#[doc = "ID: 8002"]
28168#[derive(Debug, Clone, PartialEq)]
28169#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28170#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28171pub struct SENS_POWER_DATA {
28172    #[doc = "Power board voltage sensor reading"]
28173    pub adc121_vspb_volt: f32,
28174    #[doc = "Power board current sensor reading"]
28175    pub adc121_cspb_amp: f32,
28176    #[doc = "Board current sensor 1 reading"]
28177    pub adc121_cs1_amp: f32,
28178    #[doc = "Board current sensor 2 reading"]
28179    pub adc121_cs2_amp: f32,
28180}
28181impl SENS_POWER_DATA {
28182    pub const ENCODED_LEN: usize = 16usize;
28183    pub const DEFAULT: Self = Self {
28184        adc121_vspb_volt: 0.0_f32,
28185        adc121_cspb_amp: 0.0_f32,
28186        adc121_cs1_amp: 0.0_f32,
28187        adc121_cs2_amp: 0.0_f32,
28188    };
28189    #[cfg(feature = "arbitrary")]
28190    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28191        use arbitrary::{Arbitrary, Unstructured};
28192        let mut buf = [0u8; 1024];
28193        rng.fill_bytes(&mut buf);
28194        let mut unstructured = Unstructured::new(&buf);
28195        Self::arbitrary(&mut unstructured).unwrap_or_default()
28196    }
28197}
28198impl Default for SENS_POWER_DATA {
28199    fn default() -> Self {
28200        Self::DEFAULT.clone()
28201    }
28202}
28203impl MessageData for SENS_POWER_DATA {
28204    type Message = MavMessage;
28205    const ID: u32 = 8002u32;
28206    const NAME: &'static str = "SENS_POWER";
28207    const EXTRA_CRC: u8 = 218u8;
28208    const ENCODED_LEN: usize = 16usize;
28209    fn deser(
28210        _version: MavlinkVersion,
28211        __input: &[u8],
28212    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28213        let avail_len = __input.len();
28214        let mut payload_buf = [0; Self::ENCODED_LEN];
28215        let mut buf = if avail_len < Self::ENCODED_LEN {
28216            payload_buf[0..avail_len].copy_from_slice(__input);
28217            Bytes::new(&payload_buf)
28218        } else {
28219            Bytes::new(__input)
28220        };
28221        let mut __struct = Self::default();
28222        __struct.adc121_vspb_volt = buf.get_f32_le();
28223        __struct.adc121_cspb_amp = buf.get_f32_le();
28224        __struct.adc121_cs1_amp = buf.get_f32_le();
28225        __struct.adc121_cs2_amp = buf.get_f32_le();
28226        Ok(__struct)
28227    }
28228    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28229        let mut __tmp = BytesMut::new(bytes);
28230        #[allow(clippy::absurd_extreme_comparisons)]
28231        #[allow(unused_comparisons)]
28232        if __tmp.remaining() < Self::ENCODED_LEN {
28233            panic!(
28234                "buffer is too small (need {} bytes, but got {})",
28235                Self::ENCODED_LEN,
28236                __tmp.remaining(),
28237            )
28238        }
28239        __tmp.put_f32_le(self.adc121_vspb_volt);
28240        __tmp.put_f32_le(self.adc121_cspb_amp);
28241        __tmp.put_f32_le(self.adc121_cs1_amp);
28242        __tmp.put_f32_le(self.adc121_cs2_amp);
28243        if matches!(version, MavlinkVersion::V2) {
28244            let len = __tmp.len();
28245            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28246        } else {
28247            __tmp.len()
28248        }
28249    }
28250}
28251#[doc = "Monitoring of power board status."]
28252#[doc = ""]
28253#[doc = "ID: 8013"]
28254#[derive(Debug, Clone, PartialEq)]
28255#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28256#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28257pub struct SENS_POWER_BOARD_DATA {
28258    #[doc = "Timestamp"]
28259    pub timestamp: u64,
28260    #[doc = "Power board system voltage"]
28261    pub pwr_brd_system_volt: f32,
28262    #[doc = "Power board servo voltage"]
28263    pub pwr_brd_servo_volt: f32,
28264    #[doc = "Power board digital voltage"]
28265    pub pwr_brd_digital_volt: f32,
28266    #[doc = "Power board left motor current sensor"]
28267    pub pwr_brd_mot_l_amp: f32,
28268    #[doc = "Power board right motor current sensor"]
28269    pub pwr_brd_mot_r_amp: f32,
28270    #[doc = "Power board analog current sensor"]
28271    pub pwr_brd_analog_amp: f32,
28272    #[doc = "Power board digital current sensor"]
28273    pub pwr_brd_digital_amp: f32,
28274    #[doc = "Power board extension current sensor"]
28275    pub pwr_brd_ext_amp: f32,
28276    #[doc = "Power board aux current sensor"]
28277    pub pwr_brd_aux_amp: f32,
28278    #[doc = "Power board status register"]
28279    pub pwr_brd_status: u8,
28280    #[doc = "Power board leds status"]
28281    pub pwr_brd_led_status: u8,
28282}
28283impl SENS_POWER_BOARD_DATA {
28284    pub const ENCODED_LEN: usize = 46usize;
28285    pub const DEFAULT: Self = Self {
28286        timestamp: 0_u64,
28287        pwr_brd_system_volt: 0.0_f32,
28288        pwr_brd_servo_volt: 0.0_f32,
28289        pwr_brd_digital_volt: 0.0_f32,
28290        pwr_brd_mot_l_amp: 0.0_f32,
28291        pwr_brd_mot_r_amp: 0.0_f32,
28292        pwr_brd_analog_amp: 0.0_f32,
28293        pwr_brd_digital_amp: 0.0_f32,
28294        pwr_brd_ext_amp: 0.0_f32,
28295        pwr_brd_aux_amp: 0.0_f32,
28296        pwr_brd_status: 0_u8,
28297        pwr_brd_led_status: 0_u8,
28298    };
28299    #[cfg(feature = "arbitrary")]
28300    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28301        use arbitrary::{Arbitrary, Unstructured};
28302        let mut buf = [0u8; 1024];
28303        rng.fill_bytes(&mut buf);
28304        let mut unstructured = Unstructured::new(&buf);
28305        Self::arbitrary(&mut unstructured).unwrap_or_default()
28306    }
28307}
28308impl Default for SENS_POWER_BOARD_DATA {
28309    fn default() -> Self {
28310        Self::DEFAULT.clone()
28311    }
28312}
28313impl MessageData for SENS_POWER_BOARD_DATA {
28314    type Message = MavMessage;
28315    const ID: u32 = 8013u32;
28316    const NAME: &'static str = "SENS_POWER_BOARD";
28317    const EXTRA_CRC: u8 = 222u8;
28318    const ENCODED_LEN: usize = 46usize;
28319    fn deser(
28320        _version: MavlinkVersion,
28321        __input: &[u8],
28322    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28323        let avail_len = __input.len();
28324        let mut payload_buf = [0; Self::ENCODED_LEN];
28325        let mut buf = if avail_len < Self::ENCODED_LEN {
28326            payload_buf[0..avail_len].copy_from_slice(__input);
28327            Bytes::new(&payload_buf)
28328        } else {
28329            Bytes::new(__input)
28330        };
28331        let mut __struct = Self::default();
28332        __struct.timestamp = buf.get_u64_le();
28333        __struct.pwr_brd_system_volt = buf.get_f32_le();
28334        __struct.pwr_brd_servo_volt = buf.get_f32_le();
28335        __struct.pwr_brd_digital_volt = buf.get_f32_le();
28336        __struct.pwr_brd_mot_l_amp = buf.get_f32_le();
28337        __struct.pwr_brd_mot_r_amp = buf.get_f32_le();
28338        __struct.pwr_brd_analog_amp = buf.get_f32_le();
28339        __struct.pwr_brd_digital_amp = buf.get_f32_le();
28340        __struct.pwr_brd_ext_amp = buf.get_f32_le();
28341        __struct.pwr_brd_aux_amp = buf.get_f32_le();
28342        __struct.pwr_brd_status = buf.get_u8();
28343        __struct.pwr_brd_led_status = buf.get_u8();
28344        Ok(__struct)
28345    }
28346    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28347        let mut __tmp = BytesMut::new(bytes);
28348        #[allow(clippy::absurd_extreme_comparisons)]
28349        #[allow(unused_comparisons)]
28350        if __tmp.remaining() < Self::ENCODED_LEN {
28351            panic!(
28352                "buffer is too small (need {} bytes, but got {})",
28353                Self::ENCODED_LEN,
28354                __tmp.remaining(),
28355            )
28356        }
28357        __tmp.put_u64_le(self.timestamp);
28358        __tmp.put_f32_le(self.pwr_brd_system_volt);
28359        __tmp.put_f32_le(self.pwr_brd_servo_volt);
28360        __tmp.put_f32_le(self.pwr_brd_digital_volt);
28361        __tmp.put_f32_le(self.pwr_brd_mot_l_amp);
28362        __tmp.put_f32_le(self.pwr_brd_mot_r_amp);
28363        __tmp.put_f32_le(self.pwr_brd_analog_amp);
28364        __tmp.put_f32_le(self.pwr_brd_digital_amp);
28365        __tmp.put_f32_le(self.pwr_brd_ext_amp);
28366        __tmp.put_f32_le(self.pwr_brd_aux_amp);
28367        __tmp.put_u8(self.pwr_brd_status);
28368        __tmp.put_u8(self.pwr_brd_led_status);
28369        if matches!(version, MavlinkVersion::V2) {
28370            let len = __tmp.len();
28371            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28372        } else {
28373            __tmp.len()
28374        }
28375    }
28376}
28377#[doc = "Control a serial port. This can be used for raw access to an onboard serial peripheral such as a GPS or telemetry radio. It is designed to make it possible to update the devices firmware via MAVLink messages or change the devices settings. A message with zero bytes can be used to change just the baudrate."]
28378#[doc = ""]
28379#[doc = "ID: 126"]
28380#[derive(Debug, Clone, PartialEq)]
28381#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28382#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28383pub struct SERIAL_CONTROL_DATA {
28384    #[doc = "Baudrate of transfer. Zero means no change."]
28385    pub baudrate: u32,
28386    #[doc = "Timeout for reply data"]
28387    pub timeout: u16,
28388    #[doc = "Serial control device type."]
28389    pub device: SerialControlDev,
28390    #[doc = "Bitmap of serial control flags."]
28391    pub flags: SerialControlFlag,
28392    #[doc = "how many bytes in this transfer"]
28393    pub count: u8,
28394    #[doc = "serial data"]
28395    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
28396    pub data: [u8; 70],
28397    #[doc = "System ID"]
28398    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28399    pub target_system: u8,
28400    #[doc = "Component ID"]
28401    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28402    pub target_component: u8,
28403}
28404impl SERIAL_CONTROL_DATA {
28405    pub const ENCODED_LEN: usize = 81usize;
28406    pub const DEFAULT: Self = Self {
28407        baudrate: 0_u32,
28408        timeout: 0_u16,
28409        device: SerialControlDev::DEFAULT,
28410        flags: SerialControlFlag::DEFAULT,
28411        count: 0_u8,
28412        data: [0_u8; 70usize],
28413        target_system: 0_u8,
28414        target_component: 0_u8,
28415    };
28416    #[cfg(feature = "arbitrary")]
28417    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28418        use arbitrary::{Arbitrary, Unstructured};
28419        let mut buf = [0u8; 1024];
28420        rng.fill_bytes(&mut buf);
28421        let mut unstructured = Unstructured::new(&buf);
28422        Self::arbitrary(&mut unstructured).unwrap_or_default()
28423    }
28424}
28425impl Default for SERIAL_CONTROL_DATA {
28426    fn default() -> Self {
28427        Self::DEFAULT.clone()
28428    }
28429}
28430impl MessageData for SERIAL_CONTROL_DATA {
28431    type Message = MavMessage;
28432    const ID: u32 = 126u32;
28433    const NAME: &'static str = "SERIAL_CONTROL";
28434    const EXTRA_CRC: u8 = 220u8;
28435    const ENCODED_LEN: usize = 81usize;
28436    fn deser(
28437        _version: MavlinkVersion,
28438        __input: &[u8],
28439    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28440        let avail_len = __input.len();
28441        let mut payload_buf = [0; Self::ENCODED_LEN];
28442        let mut buf = if avail_len < Self::ENCODED_LEN {
28443            payload_buf[0..avail_len].copy_from_slice(__input);
28444            Bytes::new(&payload_buf)
28445        } else {
28446            Bytes::new(__input)
28447        };
28448        let mut __struct = Self::default();
28449        __struct.baudrate = buf.get_u32_le();
28450        __struct.timeout = buf.get_u16_le();
28451        let tmp = buf.get_u8();
28452        __struct.device =
28453            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
28454                enum_type: "SerialControlDev",
28455                value: tmp as u32,
28456            })?;
28457        let tmp = buf.get_u8();
28458        __struct.flags = SerialControlFlag::from_bits(tmp & SerialControlFlag::all().bits())
28459            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
28460                flag_type: "SerialControlFlag",
28461                value: tmp as u32,
28462            })?;
28463        __struct.count = buf.get_u8();
28464        for v in &mut __struct.data {
28465            let val = buf.get_u8();
28466            *v = val;
28467        }
28468        __struct.target_system = buf.get_u8();
28469        __struct.target_component = buf.get_u8();
28470        Ok(__struct)
28471    }
28472    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28473        let mut __tmp = BytesMut::new(bytes);
28474        #[allow(clippy::absurd_extreme_comparisons)]
28475        #[allow(unused_comparisons)]
28476        if __tmp.remaining() < Self::ENCODED_LEN {
28477            panic!(
28478                "buffer is too small (need {} bytes, but got {})",
28479                Self::ENCODED_LEN,
28480                __tmp.remaining(),
28481            )
28482        }
28483        __tmp.put_u32_le(self.baudrate);
28484        __tmp.put_u16_le(self.timeout);
28485        __tmp.put_u8(self.device as u8);
28486        __tmp.put_u8(self.flags.bits());
28487        __tmp.put_u8(self.count);
28488        for val in &self.data {
28489            __tmp.put_u8(*val);
28490        }
28491        if matches!(version, MavlinkVersion::V2) {
28492            __tmp.put_u8(self.target_system);
28493            __tmp.put_u8(self.target_component);
28494            let len = __tmp.len();
28495            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28496        } else {
28497            __tmp.len()
28498        }
28499    }
28500}
28501#[doc = "Superseded by ACTUATOR_OUTPUT_STATUS. The RAW values of the servo outputs (for RC input from the remote, use the RC_CHANNELS messages). The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%."]
28502#[doc = ""]
28503#[doc = "ID: 36"]
28504#[derive(Debug, Clone, PartialEq)]
28505#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28506#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28507pub struct SERVO_OUTPUT_RAW_DATA {
28508    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
28509    pub time_usec: u32,
28510    #[doc = "Servo output 1 value"]
28511    pub servo1_raw: u16,
28512    #[doc = "Servo output 2 value"]
28513    pub servo2_raw: u16,
28514    #[doc = "Servo output 3 value"]
28515    pub servo3_raw: u16,
28516    #[doc = "Servo output 4 value"]
28517    pub servo4_raw: u16,
28518    #[doc = "Servo output 5 value"]
28519    pub servo5_raw: u16,
28520    #[doc = "Servo output 6 value"]
28521    pub servo6_raw: u16,
28522    #[doc = "Servo output 7 value"]
28523    pub servo7_raw: u16,
28524    #[doc = "Servo output 8 value"]
28525    pub servo8_raw: u16,
28526    #[doc = "Servo output port (set of 8 outputs = 1 port). Flight stacks running on Pixhawk should use: 0 = MAIN, 1 = AUX."]
28527    pub port: u8,
28528    #[doc = "Servo output 9 value"]
28529    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28530    pub servo9_raw: u16,
28531    #[doc = "Servo output 10 value"]
28532    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28533    pub servo10_raw: u16,
28534    #[doc = "Servo output 11 value"]
28535    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28536    pub servo11_raw: u16,
28537    #[doc = "Servo output 12 value"]
28538    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28539    pub servo12_raw: u16,
28540    #[doc = "Servo output 13 value"]
28541    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28542    pub servo13_raw: u16,
28543    #[doc = "Servo output 14 value"]
28544    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28545    pub servo14_raw: u16,
28546    #[doc = "Servo output 15 value"]
28547    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28548    pub servo15_raw: u16,
28549    #[doc = "Servo output 16 value"]
28550    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28551    pub servo16_raw: u16,
28552}
28553impl SERVO_OUTPUT_RAW_DATA {
28554    pub const ENCODED_LEN: usize = 37usize;
28555    pub const DEFAULT: Self = Self {
28556        time_usec: 0_u32,
28557        servo1_raw: 0_u16,
28558        servo2_raw: 0_u16,
28559        servo3_raw: 0_u16,
28560        servo4_raw: 0_u16,
28561        servo5_raw: 0_u16,
28562        servo6_raw: 0_u16,
28563        servo7_raw: 0_u16,
28564        servo8_raw: 0_u16,
28565        port: 0_u8,
28566        servo9_raw: 0_u16,
28567        servo10_raw: 0_u16,
28568        servo11_raw: 0_u16,
28569        servo12_raw: 0_u16,
28570        servo13_raw: 0_u16,
28571        servo14_raw: 0_u16,
28572        servo15_raw: 0_u16,
28573        servo16_raw: 0_u16,
28574    };
28575    #[cfg(feature = "arbitrary")]
28576    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28577        use arbitrary::{Arbitrary, Unstructured};
28578        let mut buf = [0u8; 1024];
28579        rng.fill_bytes(&mut buf);
28580        let mut unstructured = Unstructured::new(&buf);
28581        Self::arbitrary(&mut unstructured).unwrap_or_default()
28582    }
28583}
28584impl Default for SERVO_OUTPUT_RAW_DATA {
28585    fn default() -> Self {
28586        Self::DEFAULT.clone()
28587    }
28588}
28589impl MessageData for SERVO_OUTPUT_RAW_DATA {
28590    type Message = MavMessage;
28591    const ID: u32 = 36u32;
28592    const NAME: &'static str = "SERVO_OUTPUT_RAW";
28593    const EXTRA_CRC: u8 = 222u8;
28594    const ENCODED_LEN: usize = 37usize;
28595    fn deser(
28596        _version: MavlinkVersion,
28597        __input: &[u8],
28598    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28599        let avail_len = __input.len();
28600        let mut payload_buf = [0; Self::ENCODED_LEN];
28601        let mut buf = if avail_len < Self::ENCODED_LEN {
28602            payload_buf[0..avail_len].copy_from_slice(__input);
28603            Bytes::new(&payload_buf)
28604        } else {
28605            Bytes::new(__input)
28606        };
28607        let mut __struct = Self::default();
28608        __struct.time_usec = buf.get_u32_le();
28609        __struct.servo1_raw = buf.get_u16_le();
28610        __struct.servo2_raw = buf.get_u16_le();
28611        __struct.servo3_raw = buf.get_u16_le();
28612        __struct.servo4_raw = buf.get_u16_le();
28613        __struct.servo5_raw = buf.get_u16_le();
28614        __struct.servo6_raw = buf.get_u16_le();
28615        __struct.servo7_raw = buf.get_u16_le();
28616        __struct.servo8_raw = buf.get_u16_le();
28617        __struct.port = buf.get_u8();
28618        __struct.servo9_raw = buf.get_u16_le();
28619        __struct.servo10_raw = buf.get_u16_le();
28620        __struct.servo11_raw = buf.get_u16_le();
28621        __struct.servo12_raw = buf.get_u16_le();
28622        __struct.servo13_raw = buf.get_u16_le();
28623        __struct.servo14_raw = buf.get_u16_le();
28624        __struct.servo15_raw = buf.get_u16_le();
28625        __struct.servo16_raw = buf.get_u16_le();
28626        Ok(__struct)
28627    }
28628    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28629        let mut __tmp = BytesMut::new(bytes);
28630        #[allow(clippy::absurd_extreme_comparisons)]
28631        #[allow(unused_comparisons)]
28632        if __tmp.remaining() < Self::ENCODED_LEN {
28633            panic!(
28634                "buffer is too small (need {} bytes, but got {})",
28635                Self::ENCODED_LEN,
28636                __tmp.remaining(),
28637            )
28638        }
28639        __tmp.put_u32_le(self.time_usec);
28640        __tmp.put_u16_le(self.servo1_raw);
28641        __tmp.put_u16_le(self.servo2_raw);
28642        __tmp.put_u16_le(self.servo3_raw);
28643        __tmp.put_u16_le(self.servo4_raw);
28644        __tmp.put_u16_le(self.servo5_raw);
28645        __tmp.put_u16_le(self.servo6_raw);
28646        __tmp.put_u16_le(self.servo7_raw);
28647        __tmp.put_u16_le(self.servo8_raw);
28648        __tmp.put_u8(self.port);
28649        if matches!(version, MavlinkVersion::V2) {
28650            __tmp.put_u16_le(self.servo9_raw);
28651            __tmp.put_u16_le(self.servo10_raw);
28652            __tmp.put_u16_le(self.servo11_raw);
28653            __tmp.put_u16_le(self.servo12_raw);
28654            __tmp.put_u16_le(self.servo13_raw);
28655            __tmp.put_u16_le(self.servo14_raw);
28656            __tmp.put_u16_le(self.servo15_raw);
28657            __tmp.put_u16_le(self.servo16_raw);
28658            let len = __tmp.len();
28659            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28660        } else {
28661            __tmp.len()
28662        }
28663    }
28664}
28665#[doc = "Setup a MAVLink2 signing key. If called with secret_key of all zero and zero initial_timestamp will disable signing."]
28666#[doc = ""]
28667#[doc = "ID: 256"]
28668#[derive(Debug, Clone, PartialEq)]
28669#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28670#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28671pub struct SETUP_SIGNING_DATA {
28672    #[doc = "initial timestamp"]
28673    pub initial_timestamp: u64,
28674    #[doc = "system id of the target"]
28675    pub target_system: u8,
28676    #[doc = "component ID of the target"]
28677    pub target_component: u8,
28678    #[doc = "signing key"]
28679    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
28680    pub secret_key: [u8; 32],
28681}
28682impl SETUP_SIGNING_DATA {
28683    pub const ENCODED_LEN: usize = 42usize;
28684    pub const DEFAULT: Self = Self {
28685        initial_timestamp: 0_u64,
28686        target_system: 0_u8,
28687        target_component: 0_u8,
28688        secret_key: [0_u8; 32usize],
28689    };
28690    #[cfg(feature = "arbitrary")]
28691    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28692        use arbitrary::{Arbitrary, Unstructured};
28693        let mut buf = [0u8; 1024];
28694        rng.fill_bytes(&mut buf);
28695        let mut unstructured = Unstructured::new(&buf);
28696        Self::arbitrary(&mut unstructured).unwrap_or_default()
28697    }
28698}
28699impl Default for SETUP_SIGNING_DATA {
28700    fn default() -> Self {
28701        Self::DEFAULT.clone()
28702    }
28703}
28704impl MessageData for SETUP_SIGNING_DATA {
28705    type Message = MavMessage;
28706    const ID: u32 = 256u32;
28707    const NAME: &'static str = "SETUP_SIGNING";
28708    const EXTRA_CRC: u8 = 71u8;
28709    const ENCODED_LEN: usize = 42usize;
28710    fn deser(
28711        _version: MavlinkVersion,
28712        __input: &[u8],
28713    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28714        let avail_len = __input.len();
28715        let mut payload_buf = [0; Self::ENCODED_LEN];
28716        let mut buf = if avail_len < Self::ENCODED_LEN {
28717            payload_buf[0..avail_len].copy_from_slice(__input);
28718            Bytes::new(&payload_buf)
28719        } else {
28720            Bytes::new(__input)
28721        };
28722        let mut __struct = Self::default();
28723        __struct.initial_timestamp = buf.get_u64_le();
28724        __struct.target_system = buf.get_u8();
28725        __struct.target_component = buf.get_u8();
28726        for v in &mut __struct.secret_key {
28727            let val = buf.get_u8();
28728            *v = val;
28729        }
28730        Ok(__struct)
28731    }
28732    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28733        let mut __tmp = BytesMut::new(bytes);
28734        #[allow(clippy::absurd_extreme_comparisons)]
28735        #[allow(unused_comparisons)]
28736        if __tmp.remaining() < Self::ENCODED_LEN {
28737            panic!(
28738                "buffer is too small (need {} bytes, but got {})",
28739                Self::ENCODED_LEN,
28740                __tmp.remaining(),
28741            )
28742        }
28743        __tmp.put_u64_le(self.initial_timestamp);
28744        __tmp.put_u8(self.target_system);
28745        __tmp.put_u8(self.target_component);
28746        for val in &self.secret_key {
28747            __tmp.put_u8(*val);
28748        }
28749        if matches!(version, MavlinkVersion::V2) {
28750            let len = __tmp.len();
28751            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28752        } else {
28753            __tmp.len()
28754        }
28755    }
28756}
28757#[doc = "Set the vehicle attitude and body angular rates."]
28758#[doc = ""]
28759#[doc = "ID: 139"]
28760#[derive(Debug, Clone, PartialEq)]
28761#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28762#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28763pub struct SET_ACTUATOR_CONTROL_TARGET_DATA {
28764    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
28765    pub time_usec: u64,
28766    #[doc = "Actuator controls. Normed to -1..+1 where 0 is neutral position. Throttle for single rotation direction motors is 0..1, negative range for reverse direction. Standard mapping for attitude controls (group 0): (index 0-7): roll, pitch, yaw, throttle, flaps, spoilers, airbrakes, landing gear. Load a pass-through mixer to repurpose them as generic outputs."]
28767    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
28768    pub controls: [f32; 8],
28769    #[doc = "Actuator group. The \"_mlx\" indicates this is a multi-instance message and a MAVLink parser should use this field to difference between instances."]
28770    pub group_mlx: u8,
28771    #[doc = "System ID"]
28772    pub target_system: u8,
28773    #[doc = "Component ID"]
28774    pub target_component: u8,
28775}
28776impl SET_ACTUATOR_CONTROL_TARGET_DATA {
28777    pub const ENCODED_LEN: usize = 43usize;
28778    pub const DEFAULT: Self = Self {
28779        time_usec: 0_u64,
28780        controls: [0.0_f32; 8usize],
28781        group_mlx: 0_u8,
28782        target_system: 0_u8,
28783        target_component: 0_u8,
28784    };
28785    #[cfg(feature = "arbitrary")]
28786    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28787        use arbitrary::{Arbitrary, Unstructured};
28788        let mut buf = [0u8; 1024];
28789        rng.fill_bytes(&mut buf);
28790        let mut unstructured = Unstructured::new(&buf);
28791        Self::arbitrary(&mut unstructured).unwrap_or_default()
28792    }
28793}
28794impl Default for SET_ACTUATOR_CONTROL_TARGET_DATA {
28795    fn default() -> Self {
28796        Self::DEFAULT.clone()
28797    }
28798}
28799impl MessageData for SET_ACTUATOR_CONTROL_TARGET_DATA {
28800    type Message = MavMessage;
28801    const ID: u32 = 139u32;
28802    const NAME: &'static str = "SET_ACTUATOR_CONTROL_TARGET";
28803    const EXTRA_CRC: u8 = 168u8;
28804    const ENCODED_LEN: usize = 43usize;
28805    fn deser(
28806        _version: MavlinkVersion,
28807        __input: &[u8],
28808    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28809        let avail_len = __input.len();
28810        let mut payload_buf = [0; Self::ENCODED_LEN];
28811        let mut buf = if avail_len < Self::ENCODED_LEN {
28812            payload_buf[0..avail_len].copy_from_slice(__input);
28813            Bytes::new(&payload_buf)
28814        } else {
28815            Bytes::new(__input)
28816        };
28817        let mut __struct = Self::default();
28818        __struct.time_usec = buf.get_u64_le();
28819        for v in &mut __struct.controls {
28820            let val = buf.get_f32_le();
28821            *v = val;
28822        }
28823        __struct.group_mlx = buf.get_u8();
28824        __struct.target_system = buf.get_u8();
28825        __struct.target_component = buf.get_u8();
28826        Ok(__struct)
28827    }
28828    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28829        let mut __tmp = BytesMut::new(bytes);
28830        #[allow(clippy::absurd_extreme_comparisons)]
28831        #[allow(unused_comparisons)]
28832        if __tmp.remaining() < Self::ENCODED_LEN {
28833            panic!(
28834                "buffer is too small (need {} bytes, but got {})",
28835                Self::ENCODED_LEN,
28836                __tmp.remaining(),
28837            )
28838        }
28839        __tmp.put_u64_le(self.time_usec);
28840        for val in &self.controls {
28841            __tmp.put_f32_le(*val);
28842        }
28843        __tmp.put_u8(self.group_mlx);
28844        __tmp.put_u8(self.target_system);
28845        __tmp.put_u8(self.target_component);
28846        if matches!(version, MavlinkVersion::V2) {
28847            let len = __tmp.len();
28848            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28849        } else {
28850            __tmp.len()
28851        }
28852    }
28853}
28854#[doc = "Sets a desired vehicle attitude. Used by an external controller to command the vehicle (manual controller or other system)."]
28855#[doc = ""]
28856#[doc = "ID: 82"]
28857#[derive(Debug, Clone, PartialEq)]
28858#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28859#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28860pub struct SET_ATTITUDE_TARGET_DATA {
28861    #[doc = "Timestamp (time since system boot)."]
28862    pub time_boot_ms: u32,
28863    #[doc = "Attitude quaternion (w, x, y, z order, zero-rotation is 1, 0, 0, 0) from MAV_FRAME_LOCAL_NED to MAV_FRAME_BODY_FRD"]
28864    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
28865    pub q: [f32; 4],
28866    #[doc = "Body roll rate"]
28867    pub body_roll_rate: f32,
28868    #[doc = "Body pitch rate"]
28869    pub body_pitch_rate: f32,
28870    #[doc = "Body yaw rate"]
28871    pub body_yaw_rate: f32,
28872    #[doc = "Collective thrust, normalized to 0 .. 1 (-1 .. 1 for vehicles capable of reverse trust)"]
28873    pub thrust: f32,
28874    #[doc = "System ID"]
28875    pub target_system: u8,
28876    #[doc = "Component ID"]
28877    pub target_component: u8,
28878    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
28879    pub type_mask: AttitudeTargetTypemask,
28880    #[doc = "3D thrust setpoint in the body NED frame, normalized to -1 .. 1"]
28881    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28882    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
28883    pub thrust_body: [f32; 3],
28884}
28885impl SET_ATTITUDE_TARGET_DATA {
28886    pub const ENCODED_LEN: usize = 51usize;
28887    pub const DEFAULT: Self = Self {
28888        time_boot_ms: 0_u32,
28889        q: [0.0_f32; 4usize],
28890        body_roll_rate: 0.0_f32,
28891        body_pitch_rate: 0.0_f32,
28892        body_yaw_rate: 0.0_f32,
28893        thrust: 0.0_f32,
28894        target_system: 0_u8,
28895        target_component: 0_u8,
28896        type_mask: AttitudeTargetTypemask::DEFAULT,
28897        thrust_body: [0.0_f32; 3usize],
28898    };
28899    #[cfg(feature = "arbitrary")]
28900    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28901        use arbitrary::{Arbitrary, Unstructured};
28902        let mut buf = [0u8; 1024];
28903        rng.fill_bytes(&mut buf);
28904        let mut unstructured = Unstructured::new(&buf);
28905        Self::arbitrary(&mut unstructured).unwrap_or_default()
28906    }
28907}
28908impl Default for SET_ATTITUDE_TARGET_DATA {
28909    fn default() -> Self {
28910        Self::DEFAULT.clone()
28911    }
28912}
28913impl MessageData for SET_ATTITUDE_TARGET_DATA {
28914    type Message = MavMessage;
28915    const ID: u32 = 82u32;
28916    const NAME: &'static str = "SET_ATTITUDE_TARGET";
28917    const EXTRA_CRC: u8 = 49u8;
28918    const ENCODED_LEN: usize = 51usize;
28919    fn deser(
28920        _version: MavlinkVersion,
28921        __input: &[u8],
28922    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28923        let avail_len = __input.len();
28924        let mut payload_buf = [0; Self::ENCODED_LEN];
28925        let mut buf = if avail_len < Self::ENCODED_LEN {
28926            payload_buf[0..avail_len].copy_from_slice(__input);
28927            Bytes::new(&payload_buf)
28928        } else {
28929            Bytes::new(__input)
28930        };
28931        let mut __struct = Self::default();
28932        __struct.time_boot_ms = buf.get_u32_le();
28933        for v in &mut __struct.q {
28934            let val = buf.get_f32_le();
28935            *v = val;
28936        }
28937        __struct.body_roll_rate = buf.get_f32_le();
28938        __struct.body_pitch_rate = buf.get_f32_le();
28939        __struct.body_yaw_rate = buf.get_f32_le();
28940        __struct.thrust = buf.get_f32_le();
28941        __struct.target_system = buf.get_u8();
28942        __struct.target_component = buf.get_u8();
28943        let tmp = buf.get_u8();
28944        __struct.type_mask = AttitudeTargetTypemask::from_bits(
28945            tmp & AttitudeTargetTypemask::all().bits(),
28946        )
28947        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
28948            flag_type: "AttitudeTargetTypemask",
28949            value: tmp as u32,
28950        })?;
28951        for v in &mut __struct.thrust_body {
28952            let val = buf.get_f32_le();
28953            *v = val;
28954        }
28955        Ok(__struct)
28956    }
28957    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28958        let mut __tmp = BytesMut::new(bytes);
28959        #[allow(clippy::absurd_extreme_comparisons)]
28960        #[allow(unused_comparisons)]
28961        if __tmp.remaining() < Self::ENCODED_LEN {
28962            panic!(
28963                "buffer is too small (need {} bytes, but got {})",
28964                Self::ENCODED_LEN,
28965                __tmp.remaining(),
28966            )
28967        }
28968        __tmp.put_u32_le(self.time_boot_ms);
28969        for val in &self.q {
28970            __tmp.put_f32_le(*val);
28971        }
28972        __tmp.put_f32_le(self.body_roll_rate);
28973        __tmp.put_f32_le(self.body_pitch_rate);
28974        __tmp.put_f32_le(self.body_yaw_rate);
28975        __tmp.put_f32_le(self.thrust);
28976        __tmp.put_u8(self.target_system);
28977        __tmp.put_u8(self.target_component);
28978        __tmp.put_u8(self.type_mask.bits());
28979        if matches!(version, MavlinkVersion::V2) {
28980            for val in &self.thrust_body {
28981                __tmp.put_f32_le(*val);
28982            }
28983            let len = __tmp.len();
28984            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28985        } else {
28986            __tmp.len()
28987        }
28988    }
28989}
28990#[deprecated = " See `MAV_CMD_SET_GLOBAL_ORIGIN` (Deprecated since 2025-04)"]
28991#[doc = "Sets the GPS coordinates of the vehicle local origin (0,0,0) position. Vehicle should emit GPS_GLOBAL_ORIGIN irrespective of whether the origin is changed. This enables transform between the local coordinate frame and the global (GPS) coordinate frame, which may be necessary when (for example) indoor and outdoor settings are connected and the MAV should move from in- to outdoor."]
28992#[doc = ""]
28993#[doc = "ID: 48"]
28994#[derive(Debug, Clone, PartialEq)]
28995#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28996#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28997pub struct SET_GPS_GLOBAL_ORIGIN_DATA {
28998    #[doc = "Latitude (WGS84)"]
28999    pub latitude: i32,
29000    #[doc = "Longitude (WGS84)"]
29001    pub longitude: i32,
29002    #[doc = "Altitude (MSL). Positive for up."]
29003    pub altitude: i32,
29004    #[doc = "System ID"]
29005    pub target_system: u8,
29006    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
29007    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29008    pub time_usec: u64,
29009}
29010impl SET_GPS_GLOBAL_ORIGIN_DATA {
29011    pub const ENCODED_LEN: usize = 21usize;
29012    pub const DEFAULT: Self = Self {
29013        latitude: 0_i32,
29014        longitude: 0_i32,
29015        altitude: 0_i32,
29016        target_system: 0_u8,
29017        time_usec: 0_u64,
29018    };
29019    #[cfg(feature = "arbitrary")]
29020    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29021        use arbitrary::{Arbitrary, Unstructured};
29022        let mut buf = [0u8; 1024];
29023        rng.fill_bytes(&mut buf);
29024        let mut unstructured = Unstructured::new(&buf);
29025        Self::arbitrary(&mut unstructured).unwrap_or_default()
29026    }
29027}
29028impl Default for SET_GPS_GLOBAL_ORIGIN_DATA {
29029    fn default() -> Self {
29030        Self::DEFAULT.clone()
29031    }
29032}
29033impl MessageData for SET_GPS_GLOBAL_ORIGIN_DATA {
29034    type Message = MavMessage;
29035    const ID: u32 = 48u32;
29036    const NAME: &'static str = "SET_GPS_GLOBAL_ORIGIN";
29037    const EXTRA_CRC: u8 = 41u8;
29038    const ENCODED_LEN: usize = 21usize;
29039    fn deser(
29040        _version: MavlinkVersion,
29041        __input: &[u8],
29042    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29043        let avail_len = __input.len();
29044        let mut payload_buf = [0; Self::ENCODED_LEN];
29045        let mut buf = if avail_len < Self::ENCODED_LEN {
29046            payload_buf[0..avail_len].copy_from_slice(__input);
29047            Bytes::new(&payload_buf)
29048        } else {
29049            Bytes::new(__input)
29050        };
29051        let mut __struct = Self::default();
29052        __struct.latitude = buf.get_i32_le();
29053        __struct.longitude = buf.get_i32_le();
29054        __struct.altitude = buf.get_i32_le();
29055        __struct.target_system = buf.get_u8();
29056        __struct.time_usec = buf.get_u64_le();
29057        Ok(__struct)
29058    }
29059    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29060        let mut __tmp = BytesMut::new(bytes);
29061        #[allow(clippy::absurd_extreme_comparisons)]
29062        #[allow(unused_comparisons)]
29063        if __tmp.remaining() < Self::ENCODED_LEN {
29064            panic!(
29065                "buffer is too small (need {} bytes, but got {})",
29066                Self::ENCODED_LEN,
29067                __tmp.remaining(),
29068            )
29069        }
29070        __tmp.put_i32_le(self.latitude);
29071        __tmp.put_i32_le(self.longitude);
29072        __tmp.put_i32_le(self.altitude);
29073        __tmp.put_u8(self.target_system);
29074        if matches!(version, MavlinkVersion::V2) {
29075            __tmp.put_u64_le(self.time_usec);
29076            let len = __tmp.len();
29077            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29078        } else {
29079            __tmp.len()
29080        }
29081    }
29082}
29083#[deprecated = "The command protocol version (MAV_CMD_DO_SET_HOME) allows a GCS to detect when setting the home position has failed. See `MAV_CMD_DO_SET_HOME` (Deprecated since 2022-02)"]
29084#[doc = "Sets the home position. \tThe home position is the default position that the system will return to and land on.         The position is set automatically by the system during the takeoff (and may also be set using this message).         The global and local positions encode the position in the respective coordinate frames, while the q parameter encodes the orientation of the surface.         Under normal conditions it describes the heading and terrain slope, which can be used by the aircraft to adjust the approach.         The approach 3D vector describes the point to which the system should fly in normal flight mode and then perform a landing sequence along the vector.         Note: the current home position may be emitted in a HOME_POSITION message on request (using MAV_CMD_REQUEST_MESSAGE with param1=242)."]
29085#[doc = ""]
29086#[doc = "ID: 243"]
29087#[derive(Debug, Clone, PartialEq)]
29088#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29089#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29090pub struct SET_HOME_POSITION_DATA {
29091    #[doc = "Latitude (WGS84)"]
29092    pub latitude: i32,
29093    #[doc = "Longitude (WGS84)"]
29094    pub longitude: i32,
29095    #[doc = "Altitude (MSL). Positive for up."]
29096    pub altitude: i32,
29097    #[doc = "Local X position of this position in the local coordinate frame (NED)"]
29098    pub x: f32,
29099    #[doc = "Local Y position of this position in the local coordinate frame (NED)"]
29100    pub y: f32,
29101    #[doc = "Local Z position of this position in the local coordinate frame (NED: positive \"down\")"]
29102    pub z: f32,
29103    #[doc = "World to surface normal and heading transformation of the takeoff position. Used to indicate the heading and slope of the ground"]
29104    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29105    pub q: [f32; 4],
29106    #[doc = "Local X position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
29107    pub approach_x: f32,
29108    #[doc = "Local Y position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
29109    pub approach_y: f32,
29110    #[doc = "Local Z position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
29111    pub approach_z: f32,
29112    #[doc = "System ID."]
29113    pub target_system: u8,
29114    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
29115    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29116    pub time_usec: u64,
29117}
29118impl SET_HOME_POSITION_DATA {
29119    pub const ENCODED_LEN: usize = 61usize;
29120    pub const DEFAULT: Self = Self {
29121        latitude: 0_i32,
29122        longitude: 0_i32,
29123        altitude: 0_i32,
29124        x: 0.0_f32,
29125        y: 0.0_f32,
29126        z: 0.0_f32,
29127        q: [0.0_f32; 4usize],
29128        approach_x: 0.0_f32,
29129        approach_y: 0.0_f32,
29130        approach_z: 0.0_f32,
29131        target_system: 0_u8,
29132        time_usec: 0_u64,
29133    };
29134    #[cfg(feature = "arbitrary")]
29135    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29136        use arbitrary::{Arbitrary, Unstructured};
29137        let mut buf = [0u8; 1024];
29138        rng.fill_bytes(&mut buf);
29139        let mut unstructured = Unstructured::new(&buf);
29140        Self::arbitrary(&mut unstructured).unwrap_or_default()
29141    }
29142}
29143impl Default for SET_HOME_POSITION_DATA {
29144    fn default() -> Self {
29145        Self::DEFAULT.clone()
29146    }
29147}
29148impl MessageData for SET_HOME_POSITION_DATA {
29149    type Message = MavMessage;
29150    const ID: u32 = 243u32;
29151    const NAME: &'static str = "SET_HOME_POSITION";
29152    const EXTRA_CRC: u8 = 85u8;
29153    const ENCODED_LEN: usize = 61usize;
29154    fn deser(
29155        _version: MavlinkVersion,
29156        __input: &[u8],
29157    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29158        let avail_len = __input.len();
29159        let mut payload_buf = [0; Self::ENCODED_LEN];
29160        let mut buf = if avail_len < Self::ENCODED_LEN {
29161            payload_buf[0..avail_len].copy_from_slice(__input);
29162            Bytes::new(&payload_buf)
29163        } else {
29164            Bytes::new(__input)
29165        };
29166        let mut __struct = Self::default();
29167        __struct.latitude = buf.get_i32_le();
29168        __struct.longitude = buf.get_i32_le();
29169        __struct.altitude = buf.get_i32_le();
29170        __struct.x = buf.get_f32_le();
29171        __struct.y = buf.get_f32_le();
29172        __struct.z = buf.get_f32_le();
29173        for v in &mut __struct.q {
29174            let val = buf.get_f32_le();
29175            *v = val;
29176        }
29177        __struct.approach_x = buf.get_f32_le();
29178        __struct.approach_y = buf.get_f32_le();
29179        __struct.approach_z = buf.get_f32_le();
29180        __struct.target_system = buf.get_u8();
29181        __struct.time_usec = buf.get_u64_le();
29182        Ok(__struct)
29183    }
29184    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29185        let mut __tmp = BytesMut::new(bytes);
29186        #[allow(clippy::absurd_extreme_comparisons)]
29187        #[allow(unused_comparisons)]
29188        if __tmp.remaining() < Self::ENCODED_LEN {
29189            panic!(
29190                "buffer is too small (need {} bytes, but got {})",
29191                Self::ENCODED_LEN,
29192                __tmp.remaining(),
29193            )
29194        }
29195        __tmp.put_i32_le(self.latitude);
29196        __tmp.put_i32_le(self.longitude);
29197        __tmp.put_i32_le(self.altitude);
29198        __tmp.put_f32_le(self.x);
29199        __tmp.put_f32_le(self.y);
29200        __tmp.put_f32_le(self.z);
29201        for val in &self.q {
29202            __tmp.put_f32_le(*val);
29203        }
29204        __tmp.put_f32_le(self.approach_x);
29205        __tmp.put_f32_le(self.approach_y);
29206        __tmp.put_f32_le(self.approach_z);
29207        __tmp.put_u8(self.target_system);
29208        if matches!(version, MavlinkVersion::V2) {
29209            __tmp.put_u64_le(self.time_usec);
29210            let len = __tmp.len();
29211            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29212        } else {
29213            __tmp.len()
29214        }
29215    }
29216}
29217#[deprecated = "Use COMMAND_LONG with MAV_CMD_DO_SET_MODE instead. See `MAV_CMD_DO_SET_MODE` (Deprecated since 2015-12)"]
29218#[doc = "Set the system mode, as defined by enum MAV_MODE. There is no target component id as the mode is by definition for the overall aircraft, not only for one component."]
29219#[doc = ""]
29220#[doc = "ID: 11"]
29221#[derive(Debug, Clone, PartialEq)]
29222#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29223#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29224pub struct SET_MODE_DATA {
29225    #[doc = "The new autopilot-specific mode. This field can be ignored by an autopilot."]
29226    pub custom_mode: u32,
29227    #[doc = "The system setting the mode"]
29228    pub target_system: u8,
29229    #[doc = "The new base mode."]
29230    pub base_mode: MavMode,
29231}
29232impl SET_MODE_DATA {
29233    pub const ENCODED_LEN: usize = 6usize;
29234    pub const DEFAULT: Self = Self {
29235        custom_mode: 0_u32,
29236        target_system: 0_u8,
29237        base_mode: MavMode::DEFAULT,
29238    };
29239    #[cfg(feature = "arbitrary")]
29240    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29241        use arbitrary::{Arbitrary, Unstructured};
29242        let mut buf = [0u8; 1024];
29243        rng.fill_bytes(&mut buf);
29244        let mut unstructured = Unstructured::new(&buf);
29245        Self::arbitrary(&mut unstructured).unwrap_or_default()
29246    }
29247}
29248impl Default for SET_MODE_DATA {
29249    fn default() -> Self {
29250        Self::DEFAULT.clone()
29251    }
29252}
29253impl MessageData for SET_MODE_DATA {
29254    type Message = MavMessage;
29255    const ID: u32 = 11u32;
29256    const NAME: &'static str = "SET_MODE";
29257    const EXTRA_CRC: u8 = 89u8;
29258    const ENCODED_LEN: usize = 6usize;
29259    fn deser(
29260        _version: MavlinkVersion,
29261        __input: &[u8],
29262    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29263        let avail_len = __input.len();
29264        let mut payload_buf = [0; Self::ENCODED_LEN];
29265        let mut buf = if avail_len < Self::ENCODED_LEN {
29266            payload_buf[0..avail_len].copy_from_slice(__input);
29267            Bytes::new(&payload_buf)
29268        } else {
29269            Bytes::new(__input)
29270        };
29271        let mut __struct = Self::default();
29272        __struct.custom_mode = buf.get_u32_le();
29273        __struct.target_system = buf.get_u8();
29274        let tmp = buf.get_u8();
29275        __struct.base_mode =
29276            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
29277                enum_type: "MavMode",
29278                value: tmp as u32,
29279            })?;
29280        Ok(__struct)
29281    }
29282    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29283        let mut __tmp = BytesMut::new(bytes);
29284        #[allow(clippy::absurd_extreme_comparisons)]
29285        #[allow(unused_comparisons)]
29286        if __tmp.remaining() < Self::ENCODED_LEN {
29287            panic!(
29288                "buffer is too small (need {} bytes, but got {})",
29289                Self::ENCODED_LEN,
29290                __tmp.remaining(),
29291            )
29292        }
29293        __tmp.put_u32_le(self.custom_mode);
29294        __tmp.put_u8(self.target_system);
29295        __tmp.put_u8(self.base_mode as u8);
29296        if matches!(version, MavlinkVersion::V2) {
29297            let len = __tmp.len();
29298            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29299        } else {
29300            __tmp.len()
29301        }
29302    }
29303}
29304#[doc = "Sets a desired vehicle position, velocity, and/or acceleration in a global coordinate system (WGS84). Used by an external controller to command the vehicle (manual controller or other system)."]
29305#[doc = ""]
29306#[doc = "ID: 86"]
29307#[derive(Debug, Clone, PartialEq)]
29308#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29309#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29310pub struct SET_POSITION_TARGET_GLOBAL_INT_DATA {
29311    #[doc = "Timestamp (time since system boot). The rationale for the timestamp in the setpoint is to allow the system to compensate for the transport delay of the setpoint. This allows the system to compensate processing latency."]
29312    pub time_boot_ms: u32,
29313    #[doc = "Latitude in WGS84 frame"]
29314    pub lat_int: i32,
29315    #[doc = "Longitude in WGS84 frame"]
29316    pub lon_int: i32,
29317    #[doc = "Altitude (MSL, Relative to home, or AGL - depending on frame)"]
29318    pub alt: f32,
29319    #[doc = "X velocity in NED frame"]
29320    pub vx: f32,
29321    #[doc = "Y velocity in NED frame"]
29322    pub vy: f32,
29323    #[doc = "Z velocity in NED frame"]
29324    pub vz: f32,
29325    #[doc = "X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
29326    pub afx: f32,
29327    #[doc = "Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
29328    pub afy: f32,
29329    #[doc = "Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
29330    pub afz: f32,
29331    #[doc = "yaw setpoint"]
29332    pub yaw: f32,
29333    #[doc = "yaw rate setpoint"]
29334    pub yaw_rate: f32,
29335    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
29336    pub type_mask: PositionTargetTypemask,
29337    #[doc = "System ID"]
29338    pub target_system: u8,
29339    #[doc = "Component ID"]
29340    pub target_component: u8,
29341    #[doc = "Valid options are: MAV_FRAME_GLOBAL = 0, MAV_FRAME_GLOBAL_RELATIVE_ALT = 3, MAV_FRAME_GLOBAL_TERRAIN_ALT = 10 (MAV_FRAME_GLOBAL_INT, MAV_FRAME_GLOBAL_RELATIVE_ALT_INT, MAV_FRAME_GLOBAL_TERRAIN_ALT_INT are allowed synonyms, but have been deprecated)"]
29342    pub coordinate_frame: MavFrame,
29343}
29344impl SET_POSITION_TARGET_GLOBAL_INT_DATA {
29345    pub const ENCODED_LEN: usize = 53usize;
29346    pub const DEFAULT: Self = Self {
29347        time_boot_ms: 0_u32,
29348        lat_int: 0_i32,
29349        lon_int: 0_i32,
29350        alt: 0.0_f32,
29351        vx: 0.0_f32,
29352        vy: 0.0_f32,
29353        vz: 0.0_f32,
29354        afx: 0.0_f32,
29355        afy: 0.0_f32,
29356        afz: 0.0_f32,
29357        yaw: 0.0_f32,
29358        yaw_rate: 0.0_f32,
29359        type_mask: PositionTargetTypemask::DEFAULT,
29360        target_system: 0_u8,
29361        target_component: 0_u8,
29362        coordinate_frame: MavFrame::DEFAULT,
29363    };
29364    #[cfg(feature = "arbitrary")]
29365    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29366        use arbitrary::{Arbitrary, Unstructured};
29367        let mut buf = [0u8; 1024];
29368        rng.fill_bytes(&mut buf);
29369        let mut unstructured = Unstructured::new(&buf);
29370        Self::arbitrary(&mut unstructured).unwrap_or_default()
29371    }
29372}
29373impl Default for SET_POSITION_TARGET_GLOBAL_INT_DATA {
29374    fn default() -> Self {
29375        Self::DEFAULT.clone()
29376    }
29377}
29378impl MessageData for SET_POSITION_TARGET_GLOBAL_INT_DATA {
29379    type Message = MavMessage;
29380    const ID: u32 = 86u32;
29381    const NAME: &'static str = "SET_POSITION_TARGET_GLOBAL_INT";
29382    const EXTRA_CRC: u8 = 5u8;
29383    const ENCODED_LEN: usize = 53usize;
29384    fn deser(
29385        _version: MavlinkVersion,
29386        __input: &[u8],
29387    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29388        let avail_len = __input.len();
29389        let mut payload_buf = [0; Self::ENCODED_LEN];
29390        let mut buf = if avail_len < Self::ENCODED_LEN {
29391            payload_buf[0..avail_len].copy_from_slice(__input);
29392            Bytes::new(&payload_buf)
29393        } else {
29394            Bytes::new(__input)
29395        };
29396        let mut __struct = Self::default();
29397        __struct.time_boot_ms = buf.get_u32_le();
29398        __struct.lat_int = buf.get_i32_le();
29399        __struct.lon_int = buf.get_i32_le();
29400        __struct.alt = buf.get_f32_le();
29401        __struct.vx = buf.get_f32_le();
29402        __struct.vy = buf.get_f32_le();
29403        __struct.vz = buf.get_f32_le();
29404        __struct.afx = buf.get_f32_le();
29405        __struct.afy = buf.get_f32_le();
29406        __struct.afz = buf.get_f32_le();
29407        __struct.yaw = buf.get_f32_le();
29408        __struct.yaw_rate = buf.get_f32_le();
29409        let tmp = buf.get_u16_le();
29410        __struct.type_mask = PositionTargetTypemask::from_bits(
29411            tmp & PositionTargetTypemask::all().bits(),
29412        )
29413        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
29414            flag_type: "PositionTargetTypemask",
29415            value: tmp as u32,
29416        })?;
29417        __struct.target_system = buf.get_u8();
29418        __struct.target_component = buf.get_u8();
29419        let tmp = buf.get_u8();
29420        __struct.coordinate_frame =
29421            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
29422                enum_type: "MavFrame",
29423                value: tmp as u32,
29424            })?;
29425        Ok(__struct)
29426    }
29427    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29428        let mut __tmp = BytesMut::new(bytes);
29429        #[allow(clippy::absurd_extreme_comparisons)]
29430        #[allow(unused_comparisons)]
29431        if __tmp.remaining() < Self::ENCODED_LEN {
29432            panic!(
29433                "buffer is too small (need {} bytes, but got {})",
29434                Self::ENCODED_LEN,
29435                __tmp.remaining(),
29436            )
29437        }
29438        __tmp.put_u32_le(self.time_boot_ms);
29439        __tmp.put_i32_le(self.lat_int);
29440        __tmp.put_i32_le(self.lon_int);
29441        __tmp.put_f32_le(self.alt);
29442        __tmp.put_f32_le(self.vx);
29443        __tmp.put_f32_le(self.vy);
29444        __tmp.put_f32_le(self.vz);
29445        __tmp.put_f32_le(self.afx);
29446        __tmp.put_f32_le(self.afy);
29447        __tmp.put_f32_le(self.afz);
29448        __tmp.put_f32_le(self.yaw);
29449        __tmp.put_f32_le(self.yaw_rate);
29450        __tmp.put_u16_le(self.type_mask.bits());
29451        __tmp.put_u8(self.target_system);
29452        __tmp.put_u8(self.target_component);
29453        __tmp.put_u8(self.coordinate_frame as u8);
29454        if matches!(version, MavlinkVersion::V2) {
29455            let len = __tmp.len();
29456            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29457        } else {
29458            __tmp.len()
29459        }
29460    }
29461}
29462#[doc = "Sets a desired vehicle position in a local north-east-down coordinate frame. Used by an external controller to command the vehicle (manual controller or other system)."]
29463#[doc = ""]
29464#[doc = "ID: 84"]
29465#[derive(Debug, Clone, PartialEq)]
29466#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29467#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29468pub struct SET_POSITION_TARGET_LOCAL_NED_DATA {
29469    #[doc = "Timestamp (time since system boot)."]
29470    pub time_boot_ms: u32,
29471    #[doc = "X Position in NED frame"]
29472    pub x: f32,
29473    #[doc = "Y Position in NED frame"]
29474    pub y: f32,
29475    #[doc = "Z Position in NED frame (note, altitude is negative in NED)"]
29476    pub z: f32,
29477    #[doc = "X velocity in NED frame"]
29478    pub vx: f32,
29479    #[doc = "Y velocity in NED frame"]
29480    pub vy: f32,
29481    #[doc = "Z velocity in NED frame"]
29482    pub vz: f32,
29483    #[doc = "X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
29484    pub afx: f32,
29485    #[doc = "Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
29486    pub afy: f32,
29487    #[doc = "Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
29488    pub afz: f32,
29489    #[doc = "yaw setpoint"]
29490    pub yaw: f32,
29491    #[doc = "yaw rate setpoint"]
29492    pub yaw_rate: f32,
29493    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
29494    pub type_mask: PositionTargetTypemask,
29495    #[doc = "System ID"]
29496    pub target_system: u8,
29497    #[doc = "Component ID"]
29498    pub target_component: u8,
29499    #[doc = "Valid options are: MAV_FRAME_LOCAL_NED = 1, MAV_FRAME_LOCAL_OFFSET_NED = 7, MAV_FRAME_BODY_NED = 8, MAV_FRAME_BODY_OFFSET_NED = 9"]
29500    pub coordinate_frame: MavFrame,
29501}
29502impl SET_POSITION_TARGET_LOCAL_NED_DATA {
29503    pub const ENCODED_LEN: usize = 53usize;
29504    pub const DEFAULT: Self = Self {
29505        time_boot_ms: 0_u32,
29506        x: 0.0_f32,
29507        y: 0.0_f32,
29508        z: 0.0_f32,
29509        vx: 0.0_f32,
29510        vy: 0.0_f32,
29511        vz: 0.0_f32,
29512        afx: 0.0_f32,
29513        afy: 0.0_f32,
29514        afz: 0.0_f32,
29515        yaw: 0.0_f32,
29516        yaw_rate: 0.0_f32,
29517        type_mask: PositionTargetTypemask::DEFAULT,
29518        target_system: 0_u8,
29519        target_component: 0_u8,
29520        coordinate_frame: MavFrame::DEFAULT,
29521    };
29522    #[cfg(feature = "arbitrary")]
29523    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29524        use arbitrary::{Arbitrary, Unstructured};
29525        let mut buf = [0u8; 1024];
29526        rng.fill_bytes(&mut buf);
29527        let mut unstructured = Unstructured::new(&buf);
29528        Self::arbitrary(&mut unstructured).unwrap_or_default()
29529    }
29530}
29531impl Default for SET_POSITION_TARGET_LOCAL_NED_DATA {
29532    fn default() -> Self {
29533        Self::DEFAULT.clone()
29534    }
29535}
29536impl MessageData for SET_POSITION_TARGET_LOCAL_NED_DATA {
29537    type Message = MavMessage;
29538    const ID: u32 = 84u32;
29539    const NAME: &'static str = "SET_POSITION_TARGET_LOCAL_NED";
29540    const EXTRA_CRC: u8 = 143u8;
29541    const ENCODED_LEN: usize = 53usize;
29542    fn deser(
29543        _version: MavlinkVersion,
29544        __input: &[u8],
29545    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29546        let avail_len = __input.len();
29547        let mut payload_buf = [0; Self::ENCODED_LEN];
29548        let mut buf = if avail_len < Self::ENCODED_LEN {
29549            payload_buf[0..avail_len].copy_from_slice(__input);
29550            Bytes::new(&payload_buf)
29551        } else {
29552            Bytes::new(__input)
29553        };
29554        let mut __struct = Self::default();
29555        __struct.time_boot_ms = buf.get_u32_le();
29556        __struct.x = buf.get_f32_le();
29557        __struct.y = buf.get_f32_le();
29558        __struct.z = buf.get_f32_le();
29559        __struct.vx = buf.get_f32_le();
29560        __struct.vy = buf.get_f32_le();
29561        __struct.vz = buf.get_f32_le();
29562        __struct.afx = buf.get_f32_le();
29563        __struct.afy = buf.get_f32_le();
29564        __struct.afz = buf.get_f32_le();
29565        __struct.yaw = buf.get_f32_le();
29566        __struct.yaw_rate = buf.get_f32_le();
29567        let tmp = buf.get_u16_le();
29568        __struct.type_mask = PositionTargetTypemask::from_bits(
29569            tmp & PositionTargetTypemask::all().bits(),
29570        )
29571        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
29572            flag_type: "PositionTargetTypemask",
29573            value: tmp as u32,
29574        })?;
29575        __struct.target_system = buf.get_u8();
29576        __struct.target_component = buf.get_u8();
29577        let tmp = buf.get_u8();
29578        __struct.coordinate_frame =
29579            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
29580                enum_type: "MavFrame",
29581                value: tmp as u32,
29582            })?;
29583        Ok(__struct)
29584    }
29585    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29586        let mut __tmp = BytesMut::new(bytes);
29587        #[allow(clippy::absurd_extreme_comparisons)]
29588        #[allow(unused_comparisons)]
29589        if __tmp.remaining() < Self::ENCODED_LEN {
29590            panic!(
29591                "buffer is too small (need {} bytes, but got {})",
29592                Self::ENCODED_LEN,
29593                __tmp.remaining(),
29594            )
29595        }
29596        __tmp.put_u32_le(self.time_boot_ms);
29597        __tmp.put_f32_le(self.x);
29598        __tmp.put_f32_le(self.y);
29599        __tmp.put_f32_le(self.z);
29600        __tmp.put_f32_le(self.vx);
29601        __tmp.put_f32_le(self.vy);
29602        __tmp.put_f32_le(self.vz);
29603        __tmp.put_f32_le(self.afx);
29604        __tmp.put_f32_le(self.afy);
29605        __tmp.put_f32_le(self.afz);
29606        __tmp.put_f32_le(self.yaw);
29607        __tmp.put_f32_le(self.yaw_rate);
29608        __tmp.put_u16_le(self.type_mask.bits());
29609        __tmp.put_u8(self.target_system);
29610        __tmp.put_u8(self.target_component);
29611        __tmp.put_u8(self.coordinate_frame as u8);
29612        if matches!(version, MavlinkVersion::V2) {
29613            let len = __tmp.len();
29614            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29615        } else {
29616            __tmp.len()
29617        }
29618    }
29619}
29620#[doc = "Status of simulation environment, if used."]
29621#[doc = ""]
29622#[doc = "ID: 108"]
29623#[derive(Debug, Clone, PartialEq)]
29624#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29625#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29626pub struct SIM_STATE_DATA {
29627    #[doc = "True attitude quaternion component 1, w (1 in null-rotation)"]
29628    pub q1: f32,
29629    #[doc = "True attitude quaternion component 2, x (0 in null-rotation)"]
29630    pub q2: f32,
29631    #[doc = "True attitude quaternion component 3, y (0 in null-rotation)"]
29632    pub q3: f32,
29633    #[doc = "True attitude quaternion component 4, z (0 in null-rotation)"]
29634    pub q4: f32,
29635    #[doc = "Attitude roll expressed as Euler angles, not recommended except for human-readable outputs"]
29636    pub roll: f32,
29637    #[doc = "Attitude pitch expressed as Euler angles, not recommended except for human-readable outputs"]
29638    pub pitch: f32,
29639    #[doc = "Attitude yaw expressed as Euler angles, not recommended except for human-readable outputs"]
29640    pub yaw: f32,
29641    #[doc = "X acceleration"]
29642    pub xacc: f32,
29643    #[doc = "Y acceleration"]
29644    pub yacc: f32,
29645    #[doc = "Z acceleration"]
29646    pub zacc: f32,
29647    #[doc = "Angular speed around X axis"]
29648    pub xgyro: f32,
29649    #[doc = "Angular speed around Y axis"]
29650    pub ygyro: f32,
29651    #[doc = "Angular speed around Z axis"]
29652    pub zgyro: f32,
29653    #[doc = "Latitude (lower precision). Both this and the lat_int field should be set."]
29654    pub lat: f32,
29655    #[doc = "Longitude (lower precision). Both this and the lon_int field should be set."]
29656    pub lon: f32,
29657    #[doc = "Altitude"]
29658    pub alt: f32,
29659    #[doc = "Horizontal position standard deviation"]
29660    pub std_dev_horz: f32,
29661    #[doc = "Vertical position standard deviation"]
29662    pub std_dev_vert: f32,
29663    #[doc = "True velocity in north direction in earth-fixed NED frame"]
29664    pub vn: f32,
29665    #[doc = "True velocity in east direction in earth-fixed NED frame"]
29666    pub ve: f32,
29667    #[doc = "True velocity in down direction in earth-fixed NED frame"]
29668    pub vd: f32,
29669    #[doc = "Latitude (higher precision). If 0, recipients should use the lat field value (otherwise this field is preferred)."]
29670    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29671    pub lat_int: i32,
29672    #[doc = "Longitude (higher precision). If 0, recipients should use the lon field value (otherwise this field is preferred)."]
29673    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29674    pub lon_int: i32,
29675}
29676impl SIM_STATE_DATA {
29677    pub const ENCODED_LEN: usize = 92usize;
29678    pub const DEFAULT: Self = Self {
29679        q1: 0.0_f32,
29680        q2: 0.0_f32,
29681        q3: 0.0_f32,
29682        q4: 0.0_f32,
29683        roll: 0.0_f32,
29684        pitch: 0.0_f32,
29685        yaw: 0.0_f32,
29686        xacc: 0.0_f32,
29687        yacc: 0.0_f32,
29688        zacc: 0.0_f32,
29689        xgyro: 0.0_f32,
29690        ygyro: 0.0_f32,
29691        zgyro: 0.0_f32,
29692        lat: 0.0_f32,
29693        lon: 0.0_f32,
29694        alt: 0.0_f32,
29695        std_dev_horz: 0.0_f32,
29696        std_dev_vert: 0.0_f32,
29697        vn: 0.0_f32,
29698        ve: 0.0_f32,
29699        vd: 0.0_f32,
29700        lat_int: 0_i32,
29701        lon_int: 0_i32,
29702    };
29703    #[cfg(feature = "arbitrary")]
29704    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29705        use arbitrary::{Arbitrary, Unstructured};
29706        let mut buf = [0u8; 1024];
29707        rng.fill_bytes(&mut buf);
29708        let mut unstructured = Unstructured::new(&buf);
29709        Self::arbitrary(&mut unstructured).unwrap_or_default()
29710    }
29711}
29712impl Default for SIM_STATE_DATA {
29713    fn default() -> Self {
29714        Self::DEFAULT.clone()
29715    }
29716}
29717impl MessageData for SIM_STATE_DATA {
29718    type Message = MavMessage;
29719    const ID: u32 = 108u32;
29720    const NAME: &'static str = "SIM_STATE";
29721    const EXTRA_CRC: u8 = 32u8;
29722    const ENCODED_LEN: usize = 92usize;
29723    fn deser(
29724        _version: MavlinkVersion,
29725        __input: &[u8],
29726    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29727        let avail_len = __input.len();
29728        let mut payload_buf = [0; Self::ENCODED_LEN];
29729        let mut buf = if avail_len < Self::ENCODED_LEN {
29730            payload_buf[0..avail_len].copy_from_slice(__input);
29731            Bytes::new(&payload_buf)
29732        } else {
29733            Bytes::new(__input)
29734        };
29735        let mut __struct = Self::default();
29736        __struct.q1 = buf.get_f32_le();
29737        __struct.q2 = buf.get_f32_le();
29738        __struct.q3 = buf.get_f32_le();
29739        __struct.q4 = buf.get_f32_le();
29740        __struct.roll = buf.get_f32_le();
29741        __struct.pitch = buf.get_f32_le();
29742        __struct.yaw = buf.get_f32_le();
29743        __struct.xacc = buf.get_f32_le();
29744        __struct.yacc = buf.get_f32_le();
29745        __struct.zacc = buf.get_f32_le();
29746        __struct.xgyro = buf.get_f32_le();
29747        __struct.ygyro = buf.get_f32_le();
29748        __struct.zgyro = buf.get_f32_le();
29749        __struct.lat = buf.get_f32_le();
29750        __struct.lon = buf.get_f32_le();
29751        __struct.alt = buf.get_f32_le();
29752        __struct.std_dev_horz = buf.get_f32_le();
29753        __struct.std_dev_vert = buf.get_f32_le();
29754        __struct.vn = buf.get_f32_le();
29755        __struct.ve = buf.get_f32_le();
29756        __struct.vd = buf.get_f32_le();
29757        __struct.lat_int = buf.get_i32_le();
29758        __struct.lon_int = buf.get_i32_le();
29759        Ok(__struct)
29760    }
29761    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29762        let mut __tmp = BytesMut::new(bytes);
29763        #[allow(clippy::absurd_extreme_comparisons)]
29764        #[allow(unused_comparisons)]
29765        if __tmp.remaining() < Self::ENCODED_LEN {
29766            panic!(
29767                "buffer is too small (need {} bytes, but got {})",
29768                Self::ENCODED_LEN,
29769                __tmp.remaining(),
29770            )
29771        }
29772        __tmp.put_f32_le(self.q1);
29773        __tmp.put_f32_le(self.q2);
29774        __tmp.put_f32_le(self.q3);
29775        __tmp.put_f32_le(self.q4);
29776        __tmp.put_f32_le(self.roll);
29777        __tmp.put_f32_le(self.pitch);
29778        __tmp.put_f32_le(self.yaw);
29779        __tmp.put_f32_le(self.xacc);
29780        __tmp.put_f32_le(self.yacc);
29781        __tmp.put_f32_le(self.zacc);
29782        __tmp.put_f32_le(self.xgyro);
29783        __tmp.put_f32_le(self.ygyro);
29784        __tmp.put_f32_le(self.zgyro);
29785        __tmp.put_f32_le(self.lat);
29786        __tmp.put_f32_le(self.lon);
29787        __tmp.put_f32_le(self.alt);
29788        __tmp.put_f32_le(self.std_dev_horz);
29789        __tmp.put_f32_le(self.std_dev_vert);
29790        __tmp.put_f32_le(self.vn);
29791        __tmp.put_f32_le(self.ve);
29792        __tmp.put_f32_le(self.vd);
29793        if matches!(version, MavlinkVersion::V2) {
29794            __tmp.put_i32_le(self.lat_int);
29795            __tmp.put_i32_le(self.lon_int);
29796            let len = __tmp.len();
29797            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29798        } else {
29799            __tmp.len()
29800        }
29801    }
29802}
29803#[deprecated = "The BATTERY_INFO message is better aligned with UAVCAN messages, and in any case is useful even if a battery is not \"smart\". See `BATTERY_INFO` (Deprecated since 2024-02)"]
29804#[doc = "Smart Battery information (static/infrequent update). Use for updates from: smart battery to flight stack, flight stack to GCS. Use BATTERY_STATUS for the frequent battery updates."]
29805#[doc = ""]
29806#[doc = "ID: 370"]
29807#[derive(Debug, Clone, PartialEq)]
29808#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29809#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29810pub struct SMART_BATTERY_INFO_DATA {
29811    #[doc = "Capacity when full according to manufacturer, -1: field not provided."]
29812    pub capacity_full_specification: i32,
29813    #[doc = "Capacity when full (accounting for battery degradation), -1: field not provided."]
29814    pub capacity_full: i32,
29815    #[doc = "Charge/discharge cycle count. UINT16_MAX: field not provided."]
29816    pub cycle_count: u16,
29817    #[doc = "Battery weight. 0: field not provided."]
29818    pub weight: u16,
29819    #[doc = "Minimum per-cell voltage when discharging. If not supplied set to UINT16_MAX value."]
29820    pub discharge_minimum_voltage: u16,
29821    #[doc = "Minimum per-cell voltage when charging. If not supplied set to UINT16_MAX value."]
29822    pub charging_minimum_voltage: u16,
29823    #[doc = "Minimum per-cell voltage when resting. If not supplied set to UINT16_MAX value."]
29824    pub resting_minimum_voltage: u16,
29825    #[doc = "Battery ID"]
29826    pub id: u8,
29827    #[doc = "Function of the battery"]
29828    pub battery_function: MavBatteryFunction,
29829    #[doc = "Type (chemistry) of the battery"]
29830    pub mavtype: MavBatteryType,
29831    #[doc = "Serial number in ASCII characters, 0 terminated. All 0: field not provided."]
29832    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29833    pub serial_number: [u8; 16],
29834    #[doc = "Static device name in ASCII characters, 0 terminated. All 0: field not provided. Encode as manufacturer name then product name separated using an underscore."]
29835    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29836    pub device_name: [u8; 50],
29837    #[doc = "Maximum per-cell voltage when charged. 0: field not provided."]
29838    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29839    pub charging_maximum_voltage: u16,
29840    #[doc = "Number of battery cells in series. 0: field not provided."]
29841    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29842    pub cells_in_series: u8,
29843    #[doc = "Maximum pack discharge current. 0: field not provided."]
29844    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29845    pub discharge_maximum_current: u32,
29846    #[doc = "Maximum pack discharge burst current. 0: field not provided."]
29847    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29848    pub discharge_maximum_burst_current: u32,
29849    #[doc = "Manufacture date (DD/MM/YYYY) in ASCII characters, 0 terminated. All 0: field not provided."]
29850    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29851    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29852    pub manufacture_date: [u8; 11],
29853}
29854impl SMART_BATTERY_INFO_DATA {
29855    pub const ENCODED_LEN: usize = 109usize;
29856    pub const DEFAULT: Self = Self {
29857        capacity_full_specification: 0_i32,
29858        capacity_full: 0_i32,
29859        cycle_count: 0_u16,
29860        weight: 0_u16,
29861        discharge_minimum_voltage: 0_u16,
29862        charging_minimum_voltage: 0_u16,
29863        resting_minimum_voltage: 0_u16,
29864        id: 0_u8,
29865        battery_function: MavBatteryFunction::DEFAULT,
29866        mavtype: MavBatteryType::DEFAULT,
29867        serial_number: [0_u8; 16usize],
29868        device_name: [0_u8; 50usize],
29869        charging_maximum_voltage: 0_u16,
29870        cells_in_series: 0_u8,
29871        discharge_maximum_current: 0_u32,
29872        discharge_maximum_burst_current: 0_u32,
29873        manufacture_date: [0_u8; 11usize],
29874    };
29875    #[cfg(feature = "arbitrary")]
29876    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29877        use arbitrary::{Arbitrary, Unstructured};
29878        let mut buf = [0u8; 1024];
29879        rng.fill_bytes(&mut buf);
29880        let mut unstructured = Unstructured::new(&buf);
29881        Self::arbitrary(&mut unstructured).unwrap_or_default()
29882    }
29883}
29884impl Default for SMART_BATTERY_INFO_DATA {
29885    fn default() -> Self {
29886        Self::DEFAULT.clone()
29887    }
29888}
29889impl MessageData for SMART_BATTERY_INFO_DATA {
29890    type Message = MavMessage;
29891    const ID: u32 = 370u32;
29892    const NAME: &'static str = "SMART_BATTERY_INFO";
29893    const EXTRA_CRC: u8 = 75u8;
29894    const ENCODED_LEN: usize = 109usize;
29895    fn deser(
29896        _version: MavlinkVersion,
29897        __input: &[u8],
29898    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29899        let avail_len = __input.len();
29900        let mut payload_buf = [0; Self::ENCODED_LEN];
29901        let mut buf = if avail_len < Self::ENCODED_LEN {
29902            payload_buf[0..avail_len].copy_from_slice(__input);
29903            Bytes::new(&payload_buf)
29904        } else {
29905            Bytes::new(__input)
29906        };
29907        let mut __struct = Self::default();
29908        __struct.capacity_full_specification = buf.get_i32_le();
29909        __struct.capacity_full = buf.get_i32_le();
29910        __struct.cycle_count = buf.get_u16_le();
29911        __struct.weight = buf.get_u16_le();
29912        __struct.discharge_minimum_voltage = buf.get_u16_le();
29913        __struct.charging_minimum_voltage = buf.get_u16_le();
29914        __struct.resting_minimum_voltage = buf.get_u16_le();
29915        __struct.id = buf.get_u8();
29916        let tmp = buf.get_u8();
29917        __struct.battery_function =
29918            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
29919                enum_type: "MavBatteryFunction",
29920                value: tmp as u32,
29921            })?;
29922        let tmp = buf.get_u8();
29923        __struct.mavtype =
29924            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
29925                enum_type: "MavBatteryType",
29926                value: tmp as u32,
29927            })?;
29928        for v in &mut __struct.serial_number {
29929            let val = buf.get_u8();
29930            *v = val;
29931        }
29932        for v in &mut __struct.device_name {
29933            let val = buf.get_u8();
29934            *v = val;
29935        }
29936        __struct.charging_maximum_voltage = buf.get_u16_le();
29937        __struct.cells_in_series = buf.get_u8();
29938        __struct.discharge_maximum_current = buf.get_u32_le();
29939        __struct.discharge_maximum_burst_current = buf.get_u32_le();
29940        for v in &mut __struct.manufacture_date {
29941            let val = buf.get_u8();
29942            *v = val;
29943        }
29944        Ok(__struct)
29945    }
29946    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29947        let mut __tmp = BytesMut::new(bytes);
29948        #[allow(clippy::absurd_extreme_comparisons)]
29949        #[allow(unused_comparisons)]
29950        if __tmp.remaining() < Self::ENCODED_LEN {
29951            panic!(
29952                "buffer is too small (need {} bytes, but got {})",
29953                Self::ENCODED_LEN,
29954                __tmp.remaining(),
29955            )
29956        }
29957        __tmp.put_i32_le(self.capacity_full_specification);
29958        __tmp.put_i32_le(self.capacity_full);
29959        __tmp.put_u16_le(self.cycle_count);
29960        __tmp.put_u16_le(self.weight);
29961        __tmp.put_u16_le(self.discharge_minimum_voltage);
29962        __tmp.put_u16_le(self.charging_minimum_voltage);
29963        __tmp.put_u16_le(self.resting_minimum_voltage);
29964        __tmp.put_u8(self.id);
29965        __tmp.put_u8(self.battery_function as u8);
29966        __tmp.put_u8(self.mavtype as u8);
29967        for val in &self.serial_number {
29968            __tmp.put_u8(*val);
29969        }
29970        for val in &self.device_name {
29971            __tmp.put_u8(*val);
29972        }
29973        if matches!(version, MavlinkVersion::V2) {
29974            __tmp.put_u16_le(self.charging_maximum_voltage);
29975            __tmp.put_u8(self.cells_in_series);
29976            __tmp.put_u32_le(self.discharge_maximum_current);
29977            __tmp.put_u32_le(self.discharge_maximum_burst_current);
29978            for val in &self.manufacture_date {
29979                __tmp.put_u8(*val);
29980            }
29981            let len = __tmp.len();
29982            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29983        } else {
29984            __tmp.len()
29985        }
29986    }
29987}
29988#[doc = "Status text message. These messages are printed in yellow in the COMM console of QGroundControl. WARNING: They consume quite some bandwidth, so use only for important status and error messages. If implemented wisely, these messages are buffered on the MCU and sent only at a limited rate (e.g. 10 Hz)."]
29989#[doc = ""]
29990#[doc = "ID: 253"]
29991#[derive(Debug, Clone, PartialEq)]
29992#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29993#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29994pub struct STATUSTEXT_DATA {
29995    #[doc = "Severity of status. Relies on the definitions within RFC-5424."]
29996    pub severity: MavSeverity,
29997    #[doc = "Status text message, without null termination character"]
29998    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29999    pub text: [u8; 50],
30000    #[doc = "Unique (opaque) identifier for this statustext message.  May be used to reassemble a logical long-statustext message from a sequence of chunks.  A value of zero indicates this is the only chunk in the sequence and the message can be emitted immediately."]
30001    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
30002    pub id: u16,
30003    #[doc = "This chunk's sequence number; indexing is from zero.  Any null character in the text field is taken to mean this was the last chunk."]
30004    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
30005    pub chunk_seq: u8,
30006}
30007impl STATUSTEXT_DATA {
30008    pub const ENCODED_LEN: usize = 54usize;
30009    pub const DEFAULT: Self = Self {
30010        severity: MavSeverity::DEFAULT,
30011        text: [0_u8; 50usize],
30012        id: 0_u16,
30013        chunk_seq: 0_u8,
30014    };
30015    #[cfg(feature = "arbitrary")]
30016    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30017        use arbitrary::{Arbitrary, Unstructured};
30018        let mut buf = [0u8; 1024];
30019        rng.fill_bytes(&mut buf);
30020        let mut unstructured = Unstructured::new(&buf);
30021        Self::arbitrary(&mut unstructured).unwrap_or_default()
30022    }
30023}
30024impl Default for STATUSTEXT_DATA {
30025    fn default() -> Self {
30026        Self::DEFAULT.clone()
30027    }
30028}
30029impl MessageData for STATUSTEXT_DATA {
30030    type Message = MavMessage;
30031    const ID: u32 = 253u32;
30032    const NAME: &'static str = "STATUSTEXT";
30033    const EXTRA_CRC: u8 = 83u8;
30034    const ENCODED_LEN: usize = 54usize;
30035    fn deser(
30036        _version: MavlinkVersion,
30037        __input: &[u8],
30038    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30039        let avail_len = __input.len();
30040        let mut payload_buf = [0; Self::ENCODED_LEN];
30041        let mut buf = if avail_len < Self::ENCODED_LEN {
30042            payload_buf[0..avail_len].copy_from_slice(__input);
30043            Bytes::new(&payload_buf)
30044        } else {
30045            Bytes::new(__input)
30046        };
30047        let mut __struct = Self::default();
30048        let tmp = buf.get_u8();
30049        __struct.severity =
30050            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
30051                enum_type: "MavSeverity",
30052                value: tmp as u32,
30053            })?;
30054        for v in &mut __struct.text {
30055            let val = buf.get_u8();
30056            *v = val;
30057        }
30058        __struct.id = buf.get_u16_le();
30059        __struct.chunk_seq = buf.get_u8();
30060        Ok(__struct)
30061    }
30062    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30063        let mut __tmp = BytesMut::new(bytes);
30064        #[allow(clippy::absurd_extreme_comparisons)]
30065        #[allow(unused_comparisons)]
30066        if __tmp.remaining() < Self::ENCODED_LEN {
30067            panic!(
30068                "buffer is too small (need {} bytes, but got {})",
30069                Self::ENCODED_LEN,
30070                __tmp.remaining(),
30071            )
30072        }
30073        __tmp.put_u8(self.severity as u8);
30074        for val in &self.text {
30075            __tmp.put_u8(*val);
30076        }
30077        if matches!(version, MavlinkVersion::V2) {
30078            __tmp.put_u16_le(self.id);
30079            __tmp.put_u8(self.chunk_seq);
30080            let len = __tmp.len();
30081            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30082        } else {
30083            __tmp.len()
30084        }
30085    }
30086}
30087#[doc = "Information about a storage medium. This message is sent in response to a request with MAV_CMD_REQUEST_MESSAGE and whenever the status of the storage changes (STORAGE_STATUS). Use MAV_CMD_REQUEST_MESSAGE.param2 to indicate the index/id of requested storage: 0 for all, 1 for first, 2 for second, etc."]
30088#[doc = ""]
30089#[doc = "ID: 261"]
30090#[derive(Debug, Clone, PartialEq)]
30091#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30092#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30093pub struct STORAGE_INFORMATION_DATA {
30094    #[doc = "Timestamp (time since system boot)."]
30095    pub time_boot_ms: u32,
30096    #[doc = "Total capacity. If storage is not ready (STORAGE_STATUS_READY) value will be ignored."]
30097    pub total_capacity: f32,
30098    #[doc = "Used capacity. If storage is not ready (STORAGE_STATUS_READY) value will be ignored."]
30099    pub used_capacity: f32,
30100    #[doc = "Available storage capacity. If storage is not ready (STORAGE_STATUS_READY) value will be ignored."]
30101    pub available_capacity: f32,
30102    #[doc = "Read speed."]
30103    pub read_speed: f32,
30104    #[doc = "Write speed."]
30105    pub write_speed: f32,
30106    #[doc = "Storage ID (1 for first, 2 for second, etc.)"]
30107    pub storage_id: u8,
30108    #[doc = "Number of storage devices"]
30109    pub storage_count: u8,
30110    #[doc = "Status of storage"]
30111    pub status: StorageStatus,
30112    #[doc = "Type of storage"]
30113    #[cfg_attr(feature = "serde", serde(default))]
30114    pub mavtype: StorageType,
30115    #[doc = "Textual storage name to be used in UI (microSD 1, Internal Memory, etc.) This is a NULL terminated string. If it is exactly 32 characters long, add a terminating NULL. If this string is empty, the generic type is shown to the user."]
30116    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
30117    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30118    pub name: [u8; 32],
30119    #[doc = "Flags indicating whether this instance is preferred storage for photos, videos, etc.         Note: Implementations should initially set the flags on the system-default storage id used for saving media (if possible/supported).         This setting can then be overridden using MAV_CMD_SET_STORAGE_USAGE.         If the media usage flags are not set, a GCS may assume storage ID 1 is the default storage for all media types."]
30120    #[cfg_attr(feature = "serde", serde(default))]
30121    pub storage_usage: StorageUsageFlag,
30122}
30123impl STORAGE_INFORMATION_DATA {
30124    pub const ENCODED_LEN: usize = 61usize;
30125    pub const DEFAULT: Self = Self {
30126        time_boot_ms: 0_u32,
30127        total_capacity: 0.0_f32,
30128        used_capacity: 0.0_f32,
30129        available_capacity: 0.0_f32,
30130        read_speed: 0.0_f32,
30131        write_speed: 0.0_f32,
30132        storage_id: 0_u8,
30133        storage_count: 0_u8,
30134        status: StorageStatus::DEFAULT,
30135        mavtype: StorageType::DEFAULT,
30136        name: [0_u8; 32usize],
30137        storage_usage: StorageUsageFlag::DEFAULT,
30138    };
30139    #[cfg(feature = "arbitrary")]
30140    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30141        use arbitrary::{Arbitrary, Unstructured};
30142        let mut buf = [0u8; 1024];
30143        rng.fill_bytes(&mut buf);
30144        let mut unstructured = Unstructured::new(&buf);
30145        Self::arbitrary(&mut unstructured).unwrap_or_default()
30146    }
30147}
30148impl Default for STORAGE_INFORMATION_DATA {
30149    fn default() -> Self {
30150        Self::DEFAULT.clone()
30151    }
30152}
30153impl MessageData for STORAGE_INFORMATION_DATA {
30154    type Message = MavMessage;
30155    const ID: u32 = 261u32;
30156    const NAME: &'static str = "STORAGE_INFORMATION";
30157    const EXTRA_CRC: u8 = 179u8;
30158    const ENCODED_LEN: usize = 61usize;
30159    fn deser(
30160        _version: MavlinkVersion,
30161        __input: &[u8],
30162    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30163        let avail_len = __input.len();
30164        let mut payload_buf = [0; Self::ENCODED_LEN];
30165        let mut buf = if avail_len < Self::ENCODED_LEN {
30166            payload_buf[0..avail_len].copy_from_slice(__input);
30167            Bytes::new(&payload_buf)
30168        } else {
30169            Bytes::new(__input)
30170        };
30171        let mut __struct = Self::default();
30172        __struct.time_boot_ms = buf.get_u32_le();
30173        __struct.total_capacity = buf.get_f32_le();
30174        __struct.used_capacity = buf.get_f32_le();
30175        __struct.available_capacity = buf.get_f32_le();
30176        __struct.read_speed = buf.get_f32_le();
30177        __struct.write_speed = buf.get_f32_le();
30178        __struct.storage_id = buf.get_u8();
30179        __struct.storage_count = buf.get_u8();
30180        let tmp = buf.get_u8();
30181        __struct.status =
30182            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
30183                enum_type: "StorageStatus",
30184                value: tmp as u32,
30185            })?;
30186        let tmp = buf.get_u8();
30187        __struct.mavtype =
30188            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
30189                enum_type: "StorageType",
30190                value: tmp as u32,
30191            })?;
30192        for v in &mut __struct.name {
30193            let val = buf.get_u8();
30194            *v = val;
30195        }
30196        let tmp = buf.get_u8();
30197        __struct.storage_usage = StorageUsageFlag::from_bits(tmp & StorageUsageFlag::all().bits())
30198            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
30199                flag_type: "StorageUsageFlag",
30200                value: tmp as u32,
30201            })?;
30202        Ok(__struct)
30203    }
30204    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30205        let mut __tmp = BytesMut::new(bytes);
30206        #[allow(clippy::absurd_extreme_comparisons)]
30207        #[allow(unused_comparisons)]
30208        if __tmp.remaining() < Self::ENCODED_LEN {
30209            panic!(
30210                "buffer is too small (need {} bytes, but got {})",
30211                Self::ENCODED_LEN,
30212                __tmp.remaining(),
30213            )
30214        }
30215        __tmp.put_u32_le(self.time_boot_ms);
30216        __tmp.put_f32_le(self.total_capacity);
30217        __tmp.put_f32_le(self.used_capacity);
30218        __tmp.put_f32_le(self.available_capacity);
30219        __tmp.put_f32_le(self.read_speed);
30220        __tmp.put_f32_le(self.write_speed);
30221        __tmp.put_u8(self.storage_id);
30222        __tmp.put_u8(self.storage_count);
30223        __tmp.put_u8(self.status as u8);
30224        if matches!(version, MavlinkVersion::V2) {
30225            __tmp.put_u8(self.mavtype as u8);
30226            for val in &self.name {
30227                __tmp.put_u8(*val);
30228            }
30229            __tmp.put_u8(self.storage_usage.bits());
30230            let len = __tmp.len();
30231            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30232        } else {
30233            __tmp.len()
30234        }
30235    }
30236}
30237#[doc = "Tune formats supported by vehicle. This should be emitted as response to MAV_CMD_REQUEST_MESSAGE."]
30238#[doc = ""]
30239#[doc = "ID: 401"]
30240#[derive(Debug, Clone, PartialEq)]
30241#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30242#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30243pub struct SUPPORTED_TUNES_DATA {
30244    #[doc = "Bitfield of supported tune formats."]
30245    pub format: TuneFormat,
30246    #[doc = "System ID"]
30247    pub target_system: u8,
30248    #[doc = "Component ID"]
30249    pub target_component: u8,
30250}
30251impl SUPPORTED_TUNES_DATA {
30252    pub const ENCODED_LEN: usize = 6usize;
30253    pub const DEFAULT: Self = Self {
30254        format: TuneFormat::DEFAULT,
30255        target_system: 0_u8,
30256        target_component: 0_u8,
30257    };
30258    #[cfg(feature = "arbitrary")]
30259    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30260        use arbitrary::{Arbitrary, Unstructured};
30261        let mut buf = [0u8; 1024];
30262        rng.fill_bytes(&mut buf);
30263        let mut unstructured = Unstructured::new(&buf);
30264        Self::arbitrary(&mut unstructured).unwrap_or_default()
30265    }
30266}
30267impl Default for SUPPORTED_TUNES_DATA {
30268    fn default() -> Self {
30269        Self::DEFAULT.clone()
30270    }
30271}
30272impl MessageData for SUPPORTED_TUNES_DATA {
30273    type Message = MavMessage;
30274    const ID: u32 = 401u32;
30275    const NAME: &'static str = "SUPPORTED_TUNES";
30276    const EXTRA_CRC: u8 = 183u8;
30277    const ENCODED_LEN: usize = 6usize;
30278    fn deser(
30279        _version: MavlinkVersion,
30280        __input: &[u8],
30281    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30282        let avail_len = __input.len();
30283        let mut payload_buf = [0; Self::ENCODED_LEN];
30284        let mut buf = if avail_len < Self::ENCODED_LEN {
30285            payload_buf[0..avail_len].copy_from_slice(__input);
30286            Bytes::new(&payload_buf)
30287        } else {
30288            Bytes::new(__input)
30289        };
30290        let mut __struct = Self::default();
30291        let tmp = buf.get_u32_le();
30292        __struct.format = FromPrimitive::from_u32(tmp).ok_or(
30293            ::mavlink_core::error::ParserError::InvalidEnum {
30294                enum_type: "TuneFormat",
30295                value: tmp as u32,
30296            },
30297        )?;
30298        __struct.target_system = buf.get_u8();
30299        __struct.target_component = buf.get_u8();
30300        Ok(__struct)
30301    }
30302    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30303        let mut __tmp = BytesMut::new(bytes);
30304        #[allow(clippy::absurd_extreme_comparisons)]
30305        #[allow(unused_comparisons)]
30306        if __tmp.remaining() < Self::ENCODED_LEN {
30307            panic!(
30308                "buffer is too small (need {} bytes, but got {})",
30309                Self::ENCODED_LEN,
30310                __tmp.remaining(),
30311            )
30312        }
30313        __tmp.put_u32_le(self.format as u32);
30314        __tmp.put_u8(self.target_system);
30315        __tmp.put_u8(self.target_component);
30316        if matches!(version, MavlinkVersion::V2) {
30317            let len = __tmp.len();
30318            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30319        } else {
30320            __tmp.len()
30321        }
30322    }
30323}
30324#[doc = "The system time is the time of the master clock.         This can be emitted by flight controllers, onboard computers, or other components in the MAVLink network.         Components that are using a less reliable time source, such as a battery-backed real time clock, can choose to match their system clock to that of a SYSTEM_TYPE that indicates a more recent time.         This allows more broadly accurate date stamping of logs, and so on.         If precise time synchronization is needed then use TIMESYNC instead."]
30325#[doc = ""]
30326#[doc = "ID: 2"]
30327#[derive(Debug, Clone, PartialEq)]
30328#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30329#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30330pub struct SYSTEM_TIME_DATA {
30331    #[doc = "Timestamp (UNIX epoch time)."]
30332    pub time_unix_usec: u64,
30333    #[doc = "Timestamp (time since system boot)."]
30334    pub time_boot_ms: u32,
30335}
30336impl SYSTEM_TIME_DATA {
30337    pub const ENCODED_LEN: usize = 12usize;
30338    pub const DEFAULT: Self = Self {
30339        time_unix_usec: 0_u64,
30340        time_boot_ms: 0_u32,
30341    };
30342    #[cfg(feature = "arbitrary")]
30343    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30344        use arbitrary::{Arbitrary, Unstructured};
30345        let mut buf = [0u8; 1024];
30346        rng.fill_bytes(&mut buf);
30347        let mut unstructured = Unstructured::new(&buf);
30348        Self::arbitrary(&mut unstructured).unwrap_or_default()
30349    }
30350}
30351impl Default for SYSTEM_TIME_DATA {
30352    fn default() -> Self {
30353        Self::DEFAULT.clone()
30354    }
30355}
30356impl MessageData for SYSTEM_TIME_DATA {
30357    type Message = MavMessage;
30358    const ID: u32 = 2u32;
30359    const NAME: &'static str = "SYSTEM_TIME";
30360    const EXTRA_CRC: u8 = 137u8;
30361    const ENCODED_LEN: usize = 12usize;
30362    fn deser(
30363        _version: MavlinkVersion,
30364        __input: &[u8],
30365    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30366        let avail_len = __input.len();
30367        let mut payload_buf = [0; Self::ENCODED_LEN];
30368        let mut buf = if avail_len < Self::ENCODED_LEN {
30369            payload_buf[0..avail_len].copy_from_slice(__input);
30370            Bytes::new(&payload_buf)
30371        } else {
30372            Bytes::new(__input)
30373        };
30374        let mut __struct = Self::default();
30375        __struct.time_unix_usec = buf.get_u64_le();
30376        __struct.time_boot_ms = buf.get_u32_le();
30377        Ok(__struct)
30378    }
30379    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30380        let mut __tmp = BytesMut::new(bytes);
30381        #[allow(clippy::absurd_extreme_comparisons)]
30382        #[allow(unused_comparisons)]
30383        if __tmp.remaining() < Self::ENCODED_LEN {
30384            panic!(
30385                "buffer is too small (need {} bytes, but got {})",
30386                Self::ENCODED_LEN,
30387                __tmp.remaining(),
30388            )
30389        }
30390        __tmp.put_u64_le(self.time_unix_usec);
30391        __tmp.put_u32_le(self.time_boot_ms);
30392        if matches!(version, MavlinkVersion::V2) {
30393            let len = __tmp.len();
30394            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30395        } else {
30396            __tmp.len()
30397        }
30398    }
30399}
30400#[doc = "The general system state. If the system is following the MAVLink standard, the system state is mainly defined by three orthogonal states/modes: The system mode, which is either LOCKED (motors shut down and locked), MANUAL (system under RC control), GUIDED (system with autonomous position control, position setpoint controlled manually) or AUTO (system guided by path/waypoint planner). The NAV_MODE defined the current flight state: LIFTOFF (often an open-loop maneuver), LANDING, WAYPOINTS or VECTOR. This represents the internal navigation state machine. The system status shows whether the system is currently active or not and if an emergency occurred. During the CRITICAL and EMERGENCY states the MAV is still considered to be active, but should start emergency procedures autonomously. After a failure occurred it should first move from active to critical to allow manual intervention and then move to emergency after a certain timeout."]
30401#[doc = ""]
30402#[doc = "ID: 1"]
30403#[derive(Debug, Clone, PartialEq)]
30404#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30405#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30406pub struct SYS_STATUS_DATA {
30407    #[doc = "Bitmap showing which onboard controllers and sensors are present. Value of 0: not present. Value of 1: present."]
30408    pub onboard_control_sensors_present: MavSysStatusSensor,
30409    #[doc = "Bitmap showing which onboard controllers and sensors are enabled:  Value of 0: not enabled. Value of 1: enabled."]
30410    pub onboard_control_sensors_enabled: MavSysStatusSensor,
30411    #[doc = "Bitmap showing which onboard controllers and sensors have an error (or are operational). Value of 0: error. Value of 1: healthy."]
30412    pub onboard_control_sensors_health: MavSysStatusSensor,
30413    #[doc = "Maximum usage in percent of the mainloop time. Values: [0-1000] - should always be below 1000"]
30414    pub load: u16,
30415    #[doc = "Battery voltage, UINT16_MAX: Voltage not sent by autopilot"]
30416    pub voltage_battery: u16,
30417    #[doc = "Battery current, -1: Current not sent by autopilot"]
30418    pub current_battery: i16,
30419    #[doc = "Communication drop rate, (UART, I2C, SPI, CAN), dropped packets on all links (packets that were corrupted on reception on the MAV)"]
30420    pub drop_rate_comm: u16,
30421    #[doc = "Communication errors (UART, I2C, SPI, CAN), dropped packets on all links (packets that were corrupted on reception on the MAV)"]
30422    pub errors_comm: u16,
30423    #[doc = "Autopilot-specific errors"]
30424    pub errors_count1: u16,
30425    #[doc = "Autopilot-specific errors"]
30426    pub errors_count2: u16,
30427    #[doc = "Autopilot-specific errors"]
30428    pub errors_count3: u16,
30429    #[doc = "Autopilot-specific errors"]
30430    pub errors_count4: u16,
30431    #[doc = "Battery energy remaining, -1: Battery remaining energy not sent by autopilot"]
30432    pub battery_remaining: i8,
30433    #[doc = "Bitmap showing which onboard controllers and sensors are present. Value of 0: not present. Value of 1: present."]
30434    #[cfg_attr(feature = "serde", serde(default))]
30435    pub onboard_control_sensors_present_extended: MavSysStatusSensorExtended,
30436    #[doc = "Bitmap showing which onboard controllers and sensors are enabled:  Value of 0: not enabled. Value of 1: enabled."]
30437    #[cfg_attr(feature = "serde", serde(default))]
30438    pub onboard_control_sensors_enabled_extended: MavSysStatusSensorExtended,
30439    #[doc = "Bitmap showing which onboard controllers and sensors have an error (or are operational). Value of 0: error. Value of 1: healthy."]
30440    #[cfg_attr(feature = "serde", serde(default))]
30441    pub onboard_control_sensors_health_extended: MavSysStatusSensorExtended,
30442}
30443impl SYS_STATUS_DATA {
30444    pub const ENCODED_LEN: usize = 43usize;
30445    pub const DEFAULT: Self = Self {
30446        onboard_control_sensors_present: MavSysStatusSensor::DEFAULT,
30447        onboard_control_sensors_enabled: MavSysStatusSensor::DEFAULT,
30448        onboard_control_sensors_health: MavSysStatusSensor::DEFAULT,
30449        load: 0_u16,
30450        voltage_battery: 0_u16,
30451        current_battery: 0_i16,
30452        drop_rate_comm: 0_u16,
30453        errors_comm: 0_u16,
30454        errors_count1: 0_u16,
30455        errors_count2: 0_u16,
30456        errors_count3: 0_u16,
30457        errors_count4: 0_u16,
30458        battery_remaining: 0_i8,
30459        onboard_control_sensors_present_extended: MavSysStatusSensorExtended::DEFAULT,
30460        onboard_control_sensors_enabled_extended: MavSysStatusSensorExtended::DEFAULT,
30461        onboard_control_sensors_health_extended: MavSysStatusSensorExtended::DEFAULT,
30462    };
30463    #[cfg(feature = "arbitrary")]
30464    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30465        use arbitrary::{Arbitrary, Unstructured};
30466        let mut buf = [0u8; 1024];
30467        rng.fill_bytes(&mut buf);
30468        let mut unstructured = Unstructured::new(&buf);
30469        Self::arbitrary(&mut unstructured).unwrap_or_default()
30470    }
30471}
30472impl Default for SYS_STATUS_DATA {
30473    fn default() -> Self {
30474        Self::DEFAULT.clone()
30475    }
30476}
30477impl MessageData for SYS_STATUS_DATA {
30478    type Message = MavMessage;
30479    const ID: u32 = 1u32;
30480    const NAME: &'static str = "SYS_STATUS";
30481    const EXTRA_CRC: u8 = 124u8;
30482    const ENCODED_LEN: usize = 43usize;
30483    fn deser(
30484        _version: MavlinkVersion,
30485        __input: &[u8],
30486    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30487        let avail_len = __input.len();
30488        let mut payload_buf = [0; Self::ENCODED_LEN];
30489        let mut buf = if avail_len < Self::ENCODED_LEN {
30490            payload_buf[0..avail_len].copy_from_slice(__input);
30491            Bytes::new(&payload_buf)
30492        } else {
30493            Bytes::new(__input)
30494        };
30495        let mut __struct = Self::default();
30496        let tmp = buf.get_u32_le();
30497        __struct.onboard_control_sensors_present = MavSysStatusSensor::from_bits(
30498            tmp & MavSysStatusSensor::all().bits(),
30499        )
30500        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
30501            flag_type: "MavSysStatusSensor",
30502            value: tmp as u32,
30503        })?;
30504        let tmp = buf.get_u32_le();
30505        __struct.onboard_control_sensors_enabled = MavSysStatusSensor::from_bits(
30506            tmp & MavSysStatusSensor::all().bits(),
30507        )
30508        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
30509            flag_type: "MavSysStatusSensor",
30510            value: tmp as u32,
30511        })?;
30512        let tmp = buf.get_u32_le();
30513        __struct.onboard_control_sensors_health = MavSysStatusSensor::from_bits(
30514            tmp & MavSysStatusSensor::all().bits(),
30515        )
30516        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
30517            flag_type: "MavSysStatusSensor",
30518            value: tmp as u32,
30519        })?;
30520        __struct.load = buf.get_u16_le();
30521        __struct.voltage_battery = buf.get_u16_le();
30522        __struct.current_battery = buf.get_i16_le();
30523        __struct.drop_rate_comm = buf.get_u16_le();
30524        __struct.errors_comm = buf.get_u16_le();
30525        __struct.errors_count1 = buf.get_u16_le();
30526        __struct.errors_count2 = buf.get_u16_le();
30527        __struct.errors_count3 = buf.get_u16_le();
30528        __struct.errors_count4 = buf.get_u16_le();
30529        __struct.battery_remaining = buf.get_i8();
30530        let tmp = buf.get_u32_le();
30531        __struct.onboard_control_sensors_present_extended =
30532            MavSysStatusSensorExtended::from_bits(tmp & MavSysStatusSensorExtended::all().bits())
30533                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
30534                flag_type: "MavSysStatusSensorExtended",
30535                value: tmp as u32,
30536            })?;
30537        let tmp = buf.get_u32_le();
30538        __struct.onboard_control_sensors_enabled_extended =
30539            MavSysStatusSensorExtended::from_bits(tmp & MavSysStatusSensorExtended::all().bits())
30540                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
30541                flag_type: "MavSysStatusSensorExtended",
30542                value: tmp as u32,
30543            })?;
30544        let tmp = buf.get_u32_le();
30545        __struct.onboard_control_sensors_health_extended =
30546            MavSysStatusSensorExtended::from_bits(tmp & MavSysStatusSensorExtended::all().bits())
30547                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
30548                flag_type: "MavSysStatusSensorExtended",
30549                value: tmp as u32,
30550            })?;
30551        Ok(__struct)
30552    }
30553    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30554        let mut __tmp = BytesMut::new(bytes);
30555        #[allow(clippy::absurd_extreme_comparisons)]
30556        #[allow(unused_comparisons)]
30557        if __tmp.remaining() < Self::ENCODED_LEN {
30558            panic!(
30559                "buffer is too small (need {} bytes, but got {})",
30560                Self::ENCODED_LEN,
30561                __tmp.remaining(),
30562            )
30563        }
30564        __tmp.put_u32_le(self.onboard_control_sensors_present.bits());
30565        __tmp.put_u32_le(self.onboard_control_sensors_enabled.bits());
30566        __tmp.put_u32_le(self.onboard_control_sensors_health.bits());
30567        __tmp.put_u16_le(self.load);
30568        __tmp.put_u16_le(self.voltage_battery);
30569        __tmp.put_i16_le(self.current_battery);
30570        __tmp.put_u16_le(self.drop_rate_comm);
30571        __tmp.put_u16_le(self.errors_comm);
30572        __tmp.put_u16_le(self.errors_count1);
30573        __tmp.put_u16_le(self.errors_count2);
30574        __tmp.put_u16_le(self.errors_count3);
30575        __tmp.put_u16_le(self.errors_count4);
30576        __tmp.put_i8(self.battery_remaining);
30577        if matches!(version, MavlinkVersion::V2) {
30578            __tmp.put_u32_le(self.onboard_control_sensors_present_extended.bits());
30579            __tmp.put_u32_le(self.onboard_control_sensors_enabled_extended.bits());
30580            __tmp.put_u32_le(self.onboard_control_sensors_health_extended.bits());
30581            let len = __tmp.len();
30582            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30583        } else {
30584            __tmp.len()
30585        }
30586    }
30587}
30588#[doc = "Request that the vehicle report terrain height at the given location (expected response is a TERRAIN_REPORT). Used by GCS to check if vehicle has all terrain data needed for a mission."]
30589#[doc = ""]
30590#[doc = "ID: 135"]
30591#[derive(Debug, Clone, PartialEq)]
30592#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30593#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30594pub struct TERRAIN_CHECK_DATA {
30595    #[doc = "Latitude"]
30596    pub lat: i32,
30597    #[doc = "Longitude"]
30598    pub lon: i32,
30599}
30600impl TERRAIN_CHECK_DATA {
30601    pub const ENCODED_LEN: usize = 8usize;
30602    pub const DEFAULT: Self = Self {
30603        lat: 0_i32,
30604        lon: 0_i32,
30605    };
30606    #[cfg(feature = "arbitrary")]
30607    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30608        use arbitrary::{Arbitrary, Unstructured};
30609        let mut buf = [0u8; 1024];
30610        rng.fill_bytes(&mut buf);
30611        let mut unstructured = Unstructured::new(&buf);
30612        Self::arbitrary(&mut unstructured).unwrap_or_default()
30613    }
30614}
30615impl Default for TERRAIN_CHECK_DATA {
30616    fn default() -> Self {
30617        Self::DEFAULT.clone()
30618    }
30619}
30620impl MessageData for TERRAIN_CHECK_DATA {
30621    type Message = MavMessage;
30622    const ID: u32 = 135u32;
30623    const NAME: &'static str = "TERRAIN_CHECK";
30624    const EXTRA_CRC: u8 = 203u8;
30625    const ENCODED_LEN: usize = 8usize;
30626    fn deser(
30627        _version: MavlinkVersion,
30628        __input: &[u8],
30629    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30630        let avail_len = __input.len();
30631        let mut payload_buf = [0; Self::ENCODED_LEN];
30632        let mut buf = if avail_len < Self::ENCODED_LEN {
30633            payload_buf[0..avail_len].copy_from_slice(__input);
30634            Bytes::new(&payload_buf)
30635        } else {
30636            Bytes::new(__input)
30637        };
30638        let mut __struct = Self::default();
30639        __struct.lat = buf.get_i32_le();
30640        __struct.lon = buf.get_i32_le();
30641        Ok(__struct)
30642    }
30643    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30644        let mut __tmp = BytesMut::new(bytes);
30645        #[allow(clippy::absurd_extreme_comparisons)]
30646        #[allow(unused_comparisons)]
30647        if __tmp.remaining() < Self::ENCODED_LEN {
30648            panic!(
30649                "buffer is too small (need {} bytes, but got {})",
30650                Self::ENCODED_LEN,
30651                __tmp.remaining(),
30652            )
30653        }
30654        __tmp.put_i32_le(self.lat);
30655        __tmp.put_i32_le(self.lon);
30656        if matches!(version, MavlinkVersion::V2) {
30657            let len = __tmp.len();
30658            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30659        } else {
30660            __tmp.len()
30661        }
30662    }
30663}
30664#[doc = "Terrain data sent from GCS. The lat/lon and grid_spacing must be the same as a lat/lon from a TERRAIN_REQUEST. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
30665#[doc = ""]
30666#[doc = "ID: 134"]
30667#[derive(Debug, Clone, PartialEq)]
30668#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30669#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30670pub struct TERRAIN_DATA_DATA {
30671    #[doc = "Latitude of SW corner of first grid"]
30672    pub lat: i32,
30673    #[doc = "Longitude of SW corner of first grid"]
30674    pub lon: i32,
30675    #[doc = "Grid spacing"]
30676    pub grid_spacing: u16,
30677    #[doc = "Terrain data MSL"]
30678    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30679    pub data: [i16; 16],
30680    #[doc = "bit within the terrain request mask"]
30681    pub gridbit: u8,
30682}
30683impl TERRAIN_DATA_DATA {
30684    pub const ENCODED_LEN: usize = 43usize;
30685    pub const DEFAULT: Self = Self {
30686        lat: 0_i32,
30687        lon: 0_i32,
30688        grid_spacing: 0_u16,
30689        data: [0_i16; 16usize],
30690        gridbit: 0_u8,
30691    };
30692    #[cfg(feature = "arbitrary")]
30693    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30694        use arbitrary::{Arbitrary, Unstructured};
30695        let mut buf = [0u8; 1024];
30696        rng.fill_bytes(&mut buf);
30697        let mut unstructured = Unstructured::new(&buf);
30698        Self::arbitrary(&mut unstructured).unwrap_or_default()
30699    }
30700}
30701impl Default for TERRAIN_DATA_DATA {
30702    fn default() -> Self {
30703        Self::DEFAULT.clone()
30704    }
30705}
30706impl MessageData for TERRAIN_DATA_DATA {
30707    type Message = MavMessage;
30708    const ID: u32 = 134u32;
30709    const NAME: &'static str = "TERRAIN_DATA";
30710    const EXTRA_CRC: u8 = 229u8;
30711    const ENCODED_LEN: usize = 43usize;
30712    fn deser(
30713        _version: MavlinkVersion,
30714        __input: &[u8],
30715    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30716        let avail_len = __input.len();
30717        let mut payload_buf = [0; Self::ENCODED_LEN];
30718        let mut buf = if avail_len < Self::ENCODED_LEN {
30719            payload_buf[0..avail_len].copy_from_slice(__input);
30720            Bytes::new(&payload_buf)
30721        } else {
30722            Bytes::new(__input)
30723        };
30724        let mut __struct = Self::default();
30725        __struct.lat = buf.get_i32_le();
30726        __struct.lon = buf.get_i32_le();
30727        __struct.grid_spacing = buf.get_u16_le();
30728        for v in &mut __struct.data {
30729            let val = buf.get_i16_le();
30730            *v = val;
30731        }
30732        __struct.gridbit = buf.get_u8();
30733        Ok(__struct)
30734    }
30735    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30736        let mut __tmp = BytesMut::new(bytes);
30737        #[allow(clippy::absurd_extreme_comparisons)]
30738        #[allow(unused_comparisons)]
30739        if __tmp.remaining() < Self::ENCODED_LEN {
30740            panic!(
30741                "buffer is too small (need {} bytes, but got {})",
30742                Self::ENCODED_LEN,
30743                __tmp.remaining(),
30744            )
30745        }
30746        __tmp.put_i32_le(self.lat);
30747        __tmp.put_i32_le(self.lon);
30748        __tmp.put_u16_le(self.grid_spacing);
30749        for val in &self.data {
30750            __tmp.put_i16_le(*val);
30751        }
30752        __tmp.put_u8(self.gridbit);
30753        if matches!(version, MavlinkVersion::V2) {
30754            let len = __tmp.len();
30755            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30756        } else {
30757            __tmp.len()
30758        }
30759    }
30760}
30761#[doc = "Streamed from drone to report progress of terrain map download (initiated by TERRAIN_REQUEST), or sent as a response to a TERRAIN_CHECK request. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
30762#[doc = ""]
30763#[doc = "ID: 136"]
30764#[derive(Debug, Clone, PartialEq)]
30765#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30766#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30767pub struct TERRAIN_REPORT_DATA {
30768    #[doc = "Latitude"]
30769    pub lat: i32,
30770    #[doc = "Longitude"]
30771    pub lon: i32,
30772    #[doc = "Terrain height MSL"]
30773    pub terrain_height: f32,
30774    #[doc = "Current vehicle height above lat/lon terrain height"]
30775    pub current_height: f32,
30776    #[doc = "grid spacing (zero if terrain at this location unavailable)"]
30777    pub spacing: u16,
30778    #[doc = "Number of 4x4 terrain blocks waiting to be received or read from disk"]
30779    pub pending: u16,
30780    #[doc = "Number of 4x4 terrain blocks in memory"]
30781    pub loaded: u16,
30782}
30783impl TERRAIN_REPORT_DATA {
30784    pub const ENCODED_LEN: usize = 22usize;
30785    pub const DEFAULT: Self = Self {
30786        lat: 0_i32,
30787        lon: 0_i32,
30788        terrain_height: 0.0_f32,
30789        current_height: 0.0_f32,
30790        spacing: 0_u16,
30791        pending: 0_u16,
30792        loaded: 0_u16,
30793    };
30794    #[cfg(feature = "arbitrary")]
30795    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30796        use arbitrary::{Arbitrary, Unstructured};
30797        let mut buf = [0u8; 1024];
30798        rng.fill_bytes(&mut buf);
30799        let mut unstructured = Unstructured::new(&buf);
30800        Self::arbitrary(&mut unstructured).unwrap_or_default()
30801    }
30802}
30803impl Default for TERRAIN_REPORT_DATA {
30804    fn default() -> Self {
30805        Self::DEFAULT.clone()
30806    }
30807}
30808impl MessageData for TERRAIN_REPORT_DATA {
30809    type Message = MavMessage;
30810    const ID: u32 = 136u32;
30811    const NAME: &'static str = "TERRAIN_REPORT";
30812    const EXTRA_CRC: u8 = 1u8;
30813    const ENCODED_LEN: usize = 22usize;
30814    fn deser(
30815        _version: MavlinkVersion,
30816        __input: &[u8],
30817    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30818        let avail_len = __input.len();
30819        let mut payload_buf = [0; Self::ENCODED_LEN];
30820        let mut buf = if avail_len < Self::ENCODED_LEN {
30821            payload_buf[0..avail_len].copy_from_slice(__input);
30822            Bytes::new(&payload_buf)
30823        } else {
30824            Bytes::new(__input)
30825        };
30826        let mut __struct = Self::default();
30827        __struct.lat = buf.get_i32_le();
30828        __struct.lon = buf.get_i32_le();
30829        __struct.terrain_height = buf.get_f32_le();
30830        __struct.current_height = buf.get_f32_le();
30831        __struct.spacing = buf.get_u16_le();
30832        __struct.pending = buf.get_u16_le();
30833        __struct.loaded = buf.get_u16_le();
30834        Ok(__struct)
30835    }
30836    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30837        let mut __tmp = BytesMut::new(bytes);
30838        #[allow(clippy::absurd_extreme_comparisons)]
30839        #[allow(unused_comparisons)]
30840        if __tmp.remaining() < Self::ENCODED_LEN {
30841            panic!(
30842                "buffer is too small (need {} bytes, but got {})",
30843                Self::ENCODED_LEN,
30844                __tmp.remaining(),
30845            )
30846        }
30847        __tmp.put_i32_le(self.lat);
30848        __tmp.put_i32_le(self.lon);
30849        __tmp.put_f32_le(self.terrain_height);
30850        __tmp.put_f32_le(self.current_height);
30851        __tmp.put_u16_le(self.spacing);
30852        __tmp.put_u16_le(self.pending);
30853        __tmp.put_u16_le(self.loaded);
30854        if matches!(version, MavlinkVersion::V2) {
30855            let len = __tmp.len();
30856            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30857        } else {
30858            __tmp.len()
30859        }
30860    }
30861}
30862#[doc = "Request for terrain data and terrain status. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
30863#[doc = ""]
30864#[doc = "ID: 133"]
30865#[derive(Debug, Clone, PartialEq)]
30866#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30867#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30868pub struct TERRAIN_REQUEST_DATA {
30869    #[doc = "Bitmask of requested 4x4 grids (row major 8x7 array of grids, 56 bits)"]
30870    pub mask: u64,
30871    #[doc = "Latitude of SW corner of first grid"]
30872    pub lat: i32,
30873    #[doc = "Longitude of SW corner of first grid"]
30874    pub lon: i32,
30875    #[doc = "Grid spacing"]
30876    pub grid_spacing: u16,
30877}
30878impl TERRAIN_REQUEST_DATA {
30879    pub const ENCODED_LEN: usize = 18usize;
30880    pub const DEFAULT: Self = Self {
30881        mask: 0_u64,
30882        lat: 0_i32,
30883        lon: 0_i32,
30884        grid_spacing: 0_u16,
30885    };
30886    #[cfg(feature = "arbitrary")]
30887    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30888        use arbitrary::{Arbitrary, Unstructured};
30889        let mut buf = [0u8; 1024];
30890        rng.fill_bytes(&mut buf);
30891        let mut unstructured = Unstructured::new(&buf);
30892        Self::arbitrary(&mut unstructured).unwrap_or_default()
30893    }
30894}
30895impl Default for TERRAIN_REQUEST_DATA {
30896    fn default() -> Self {
30897        Self::DEFAULT.clone()
30898    }
30899}
30900impl MessageData for TERRAIN_REQUEST_DATA {
30901    type Message = MavMessage;
30902    const ID: u32 = 133u32;
30903    const NAME: &'static str = "TERRAIN_REQUEST";
30904    const EXTRA_CRC: u8 = 6u8;
30905    const ENCODED_LEN: usize = 18usize;
30906    fn deser(
30907        _version: MavlinkVersion,
30908        __input: &[u8],
30909    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30910        let avail_len = __input.len();
30911        let mut payload_buf = [0; Self::ENCODED_LEN];
30912        let mut buf = if avail_len < Self::ENCODED_LEN {
30913            payload_buf[0..avail_len].copy_from_slice(__input);
30914            Bytes::new(&payload_buf)
30915        } else {
30916            Bytes::new(__input)
30917        };
30918        let mut __struct = Self::default();
30919        __struct.mask = buf.get_u64_le();
30920        __struct.lat = buf.get_i32_le();
30921        __struct.lon = buf.get_i32_le();
30922        __struct.grid_spacing = buf.get_u16_le();
30923        Ok(__struct)
30924    }
30925    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30926        let mut __tmp = BytesMut::new(bytes);
30927        #[allow(clippy::absurd_extreme_comparisons)]
30928        #[allow(unused_comparisons)]
30929        if __tmp.remaining() < Self::ENCODED_LEN {
30930            panic!(
30931                "buffer is too small (need {} bytes, but got {})",
30932                Self::ENCODED_LEN,
30933                __tmp.remaining(),
30934            )
30935        }
30936        __tmp.put_u64_le(self.mask);
30937        __tmp.put_i32_le(self.lat);
30938        __tmp.put_i32_le(self.lon);
30939        __tmp.put_u16_le(self.grid_spacing);
30940        if matches!(version, MavlinkVersion::V2) {
30941            let len = __tmp.len();
30942            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30943        } else {
30944            __tmp.len()
30945        }
30946    }
30947}
30948#[doc = "Time synchronization message.         The message is used for both timesync requests and responses.         The request is sent with `ts1=syncing component timestamp` and `tc1=0`, and may be broadcast or targeted to a specific system/component.         The response is sent with `ts1=syncing component timestamp` (mirror back unchanged), and `tc1=responding component timestamp`, with the `target_system` and `target_component` set to ids of the original request.         Systems can determine if they are receiving a request or response based on the value of `tc`.         If the response has `target_system==target_component==0` the remote system has not been updated to use the component IDs and cannot reliably timesync; the requestor may report an error.         Timestamps are UNIX Epoch time or time since system boot in nanoseconds (the timestamp format can be inferred by checking for the magnitude of the number; generally it doesn't matter as only the offset is used).         The message sequence is repeated numerous times with results being filtered/averaged to estimate the offset.         See also: <https://mavlink.io/en/services/timesync.html>."]
30949#[doc = ""]
30950#[doc = "ID: 111"]
30951#[derive(Debug, Clone, PartialEq)]
30952#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30953#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30954pub struct TIMESYNC_DATA {
30955    #[doc = "Time sync timestamp 1. Syncing: 0. Responding: Timestamp of responding component."]
30956    pub tc1: i64,
30957    #[doc = "Time sync timestamp 2. Timestamp of syncing component (mirrored in response)."]
30958    pub ts1: i64,
30959    #[doc = "Target system id. Request: 0 (broadcast) or id of specific system. Response must contain system id of the requesting component."]
30960    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
30961    pub target_system: u8,
30962    #[doc = "Target component id. Request: 0 (broadcast) or id of specific component. Response must contain component id of the requesting component."]
30963    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
30964    pub target_component: u8,
30965}
30966impl TIMESYNC_DATA {
30967    pub const ENCODED_LEN: usize = 18usize;
30968    pub const DEFAULT: Self = Self {
30969        tc1: 0_i64,
30970        ts1: 0_i64,
30971        target_system: 0_u8,
30972        target_component: 0_u8,
30973    };
30974    #[cfg(feature = "arbitrary")]
30975    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30976        use arbitrary::{Arbitrary, Unstructured};
30977        let mut buf = [0u8; 1024];
30978        rng.fill_bytes(&mut buf);
30979        let mut unstructured = Unstructured::new(&buf);
30980        Self::arbitrary(&mut unstructured).unwrap_or_default()
30981    }
30982}
30983impl Default for TIMESYNC_DATA {
30984    fn default() -> Self {
30985        Self::DEFAULT.clone()
30986    }
30987}
30988impl MessageData for TIMESYNC_DATA {
30989    type Message = MavMessage;
30990    const ID: u32 = 111u32;
30991    const NAME: &'static str = "TIMESYNC";
30992    const EXTRA_CRC: u8 = 34u8;
30993    const ENCODED_LEN: usize = 18usize;
30994    fn deser(
30995        _version: MavlinkVersion,
30996        __input: &[u8],
30997    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30998        let avail_len = __input.len();
30999        let mut payload_buf = [0; Self::ENCODED_LEN];
31000        let mut buf = if avail_len < Self::ENCODED_LEN {
31001            payload_buf[0..avail_len].copy_from_slice(__input);
31002            Bytes::new(&payload_buf)
31003        } else {
31004            Bytes::new(__input)
31005        };
31006        let mut __struct = Self::default();
31007        __struct.tc1 = buf.get_i64_le();
31008        __struct.ts1 = buf.get_i64_le();
31009        __struct.target_system = buf.get_u8();
31010        __struct.target_component = buf.get_u8();
31011        Ok(__struct)
31012    }
31013    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31014        let mut __tmp = BytesMut::new(bytes);
31015        #[allow(clippy::absurd_extreme_comparisons)]
31016        #[allow(unused_comparisons)]
31017        if __tmp.remaining() < Self::ENCODED_LEN {
31018            panic!(
31019                "buffer is too small (need {} bytes, but got {})",
31020                Self::ENCODED_LEN,
31021                __tmp.remaining(),
31022            )
31023        }
31024        __tmp.put_i64_le(self.tc1);
31025        __tmp.put_i64_le(self.ts1);
31026        if matches!(version, MavlinkVersion::V2) {
31027            __tmp.put_u8(self.target_system);
31028            __tmp.put_u8(self.target_component);
31029            let len = __tmp.len();
31030            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31031        } else {
31032            __tmp.len()
31033        }
31034    }
31035}
31036#[doc = "Time/duration estimates for various events and actions given the current vehicle state and position."]
31037#[doc = ""]
31038#[doc = "ID: 380"]
31039#[derive(Debug, Clone, PartialEq)]
31040#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31041#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31042pub struct TIME_ESTIMATE_TO_TARGET_DATA {
31043    #[doc = "Estimated time to complete the vehicle's configured \"safe return\" action from its current position (e.g. RTL, Smart RTL, etc.). -1 indicates that the vehicle is landed, or that no time estimate available."]
31044    pub safe_return: i32,
31045    #[doc = "Estimated time for vehicle to complete the LAND action from its current position. -1 indicates that the vehicle is landed, or that no time estimate available."]
31046    pub land: i32,
31047    #[doc = "Estimated time for reaching/completing the currently active mission item. -1 means no time estimate available."]
31048    pub mission_next_item: i32,
31049    #[doc = "Estimated time for completing the current mission. -1 means no mission active and/or no estimate available."]
31050    pub mission_end: i32,
31051    #[doc = "Estimated time for completing the current commanded action (i.e. Go To, Takeoff, Land, etc.). -1 means no action active and/or no estimate available."]
31052    pub commanded_action: i32,
31053}
31054impl TIME_ESTIMATE_TO_TARGET_DATA {
31055    pub const ENCODED_LEN: usize = 20usize;
31056    pub const DEFAULT: Self = Self {
31057        safe_return: 0_i32,
31058        land: 0_i32,
31059        mission_next_item: 0_i32,
31060        mission_end: 0_i32,
31061        commanded_action: 0_i32,
31062    };
31063    #[cfg(feature = "arbitrary")]
31064    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31065        use arbitrary::{Arbitrary, Unstructured};
31066        let mut buf = [0u8; 1024];
31067        rng.fill_bytes(&mut buf);
31068        let mut unstructured = Unstructured::new(&buf);
31069        Self::arbitrary(&mut unstructured).unwrap_or_default()
31070    }
31071}
31072impl Default for TIME_ESTIMATE_TO_TARGET_DATA {
31073    fn default() -> Self {
31074        Self::DEFAULT.clone()
31075    }
31076}
31077impl MessageData for TIME_ESTIMATE_TO_TARGET_DATA {
31078    type Message = MavMessage;
31079    const ID: u32 = 380u32;
31080    const NAME: &'static str = "TIME_ESTIMATE_TO_TARGET";
31081    const EXTRA_CRC: u8 = 232u8;
31082    const ENCODED_LEN: usize = 20usize;
31083    fn deser(
31084        _version: MavlinkVersion,
31085        __input: &[u8],
31086    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31087        let avail_len = __input.len();
31088        let mut payload_buf = [0; Self::ENCODED_LEN];
31089        let mut buf = if avail_len < Self::ENCODED_LEN {
31090            payload_buf[0..avail_len].copy_from_slice(__input);
31091            Bytes::new(&payload_buf)
31092        } else {
31093            Bytes::new(__input)
31094        };
31095        let mut __struct = Self::default();
31096        __struct.safe_return = buf.get_i32_le();
31097        __struct.land = buf.get_i32_le();
31098        __struct.mission_next_item = buf.get_i32_le();
31099        __struct.mission_end = buf.get_i32_le();
31100        __struct.commanded_action = buf.get_i32_le();
31101        Ok(__struct)
31102    }
31103    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31104        let mut __tmp = BytesMut::new(bytes);
31105        #[allow(clippy::absurd_extreme_comparisons)]
31106        #[allow(unused_comparisons)]
31107        if __tmp.remaining() < Self::ENCODED_LEN {
31108            panic!(
31109                "buffer is too small (need {} bytes, but got {})",
31110                Self::ENCODED_LEN,
31111                __tmp.remaining(),
31112            )
31113        }
31114        __tmp.put_i32_le(self.safe_return);
31115        __tmp.put_i32_le(self.land);
31116        __tmp.put_i32_le(self.mission_next_item);
31117        __tmp.put_i32_le(self.mission_end);
31118        __tmp.put_i32_le(self.commanded_action);
31119        if matches!(version, MavlinkVersion::V2) {
31120            let len = __tmp.len();
31121            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31122        } else {
31123            __tmp.len()
31124        }
31125    }
31126}
31127#[doc = "Describe a trajectory using an array of up-to 5 bezier control points in the local frame (MAV_FRAME_LOCAL_NED)."]
31128#[doc = ""]
31129#[doc = "ID: 333"]
31130#[derive(Debug, Clone, PartialEq)]
31131#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31132#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31133pub struct TRAJECTORY_REPRESENTATION_BEZIER_DATA {
31134    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
31135    pub time_usec: u64,
31136    #[doc = "X-coordinate of bezier control points. Set to NaN if not being used"]
31137    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31138    pub pos_x: [f32; 5],
31139    #[doc = "Y-coordinate of bezier control points. Set to NaN if not being used"]
31140    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31141    pub pos_y: [f32; 5],
31142    #[doc = "Z-coordinate of bezier control points. Set to NaN if not being used"]
31143    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31144    pub pos_z: [f32; 5],
31145    #[doc = "Bezier time horizon. Set to NaN if velocity/acceleration should not be incorporated"]
31146    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31147    pub delta: [f32; 5],
31148    #[doc = "Yaw. Set to NaN for unchanged"]
31149    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31150    pub pos_yaw: [f32; 5],
31151    #[doc = "Number of valid control points (up-to 5 points are possible)"]
31152    pub valid_points: u8,
31153}
31154impl TRAJECTORY_REPRESENTATION_BEZIER_DATA {
31155    pub const ENCODED_LEN: usize = 109usize;
31156    pub const DEFAULT: Self = Self {
31157        time_usec: 0_u64,
31158        pos_x: [0.0_f32; 5usize],
31159        pos_y: [0.0_f32; 5usize],
31160        pos_z: [0.0_f32; 5usize],
31161        delta: [0.0_f32; 5usize],
31162        pos_yaw: [0.0_f32; 5usize],
31163        valid_points: 0_u8,
31164    };
31165    #[cfg(feature = "arbitrary")]
31166    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31167        use arbitrary::{Arbitrary, Unstructured};
31168        let mut buf = [0u8; 1024];
31169        rng.fill_bytes(&mut buf);
31170        let mut unstructured = Unstructured::new(&buf);
31171        Self::arbitrary(&mut unstructured).unwrap_or_default()
31172    }
31173}
31174impl Default for TRAJECTORY_REPRESENTATION_BEZIER_DATA {
31175    fn default() -> Self {
31176        Self::DEFAULT.clone()
31177    }
31178}
31179impl MessageData for TRAJECTORY_REPRESENTATION_BEZIER_DATA {
31180    type Message = MavMessage;
31181    const ID: u32 = 333u32;
31182    const NAME: &'static str = "TRAJECTORY_REPRESENTATION_BEZIER";
31183    const EXTRA_CRC: u8 = 231u8;
31184    const ENCODED_LEN: usize = 109usize;
31185    fn deser(
31186        _version: MavlinkVersion,
31187        __input: &[u8],
31188    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31189        let avail_len = __input.len();
31190        let mut payload_buf = [0; Self::ENCODED_LEN];
31191        let mut buf = if avail_len < Self::ENCODED_LEN {
31192            payload_buf[0..avail_len].copy_from_slice(__input);
31193            Bytes::new(&payload_buf)
31194        } else {
31195            Bytes::new(__input)
31196        };
31197        let mut __struct = Self::default();
31198        __struct.time_usec = buf.get_u64_le();
31199        for v in &mut __struct.pos_x {
31200            let val = buf.get_f32_le();
31201            *v = val;
31202        }
31203        for v in &mut __struct.pos_y {
31204            let val = buf.get_f32_le();
31205            *v = val;
31206        }
31207        for v in &mut __struct.pos_z {
31208            let val = buf.get_f32_le();
31209            *v = val;
31210        }
31211        for v in &mut __struct.delta {
31212            let val = buf.get_f32_le();
31213            *v = val;
31214        }
31215        for v in &mut __struct.pos_yaw {
31216            let val = buf.get_f32_le();
31217            *v = val;
31218        }
31219        __struct.valid_points = buf.get_u8();
31220        Ok(__struct)
31221    }
31222    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31223        let mut __tmp = BytesMut::new(bytes);
31224        #[allow(clippy::absurd_extreme_comparisons)]
31225        #[allow(unused_comparisons)]
31226        if __tmp.remaining() < Self::ENCODED_LEN {
31227            panic!(
31228                "buffer is too small (need {} bytes, but got {})",
31229                Self::ENCODED_LEN,
31230                __tmp.remaining(),
31231            )
31232        }
31233        __tmp.put_u64_le(self.time_usec);
31234        for val in &self.pos_x {
31235            __tmp.put_f32_le(*val);
31236        }
31237        for val in &self.pos_y {
31238            __tmp.put_f32_le(*val);
31239        }
31240        for val in &self.pos_z {
31241            __tmp.put_f32_le(*val);
31242        }
31243        for val in &self.delta {
31244            __tmp.put_f32_le(*val);
31245        }
31246        for val in &self.pos_yaw {
31247            __tmp.put_f32_le(*val);
31248        }
31249        __tmp.put_u8(self.valid_points);
31250        if matches!(version, MavlinkVersion::V2) {
31251            let len = __tmp.len();
31252            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31253        } else {
31254            __tmp.len()
31255        }
31256    }
31257}
31258#[doc = "Describe a trajectory using an array of up-to 5 waypoints in the local frame (MAV_FRAME_LOCAL_NED)."]
31259#[doc = ""]
31260#[doc = "ID: 332"]
31261#[derive(Debug, Clone, PartialEq)]
31262#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31263#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31264pub struct TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA {
31265    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
31266    pub time_usec: u64,
31267    #[doc = "X-coordinate of waypoint, set to NaN if not being used"]
31268    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31269    pub pos_x: [f32; 5],
31270    #[doc = "Y-coordinate of waypoint, set to NaN if not being used"]
31271    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31272    pub pos_y: [f32; 5],
31273    #[doc = "Z-coordinate of waypoint, set to NaN if not being used"]
31274    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31275    pub pos_z: [f32; 5],
31276    #[doc = "X-velocity of waypoint, set to NaN if not being used"]
31277    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31278    pub vel_x: [f32; 5],
31279    #[doc = "Y-velocity of waypoint, set to NaN if not being used"]
31280    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31281    pub vel_y: [f32; 5],
31282    #[doc = "Z-velocity of waypoint, set to NaN if not being used"]
31283    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31284    pub vel_z: [f32; 5],
31285    #[doc = "X-acceleration of waypoint, set to NaN if not being used"]
31286    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31287    pub acc_x: [f32; 5],
31288    #[doc = "Y-acceleration of waypoint, set to NaN if not being used"]
31289    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31290    pub acc_y: [f32; 5],
31291    #[doc = "Z-acceleration of waypoint, set to NaN if not being used"]
31292    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31293    pub acc_z: [f32; 5],
31294    #[doc = "Yaw angle, set to NaN if not being used"]
31295    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31296    pub pos_yaw: [f32; 5],
31297    #[doc = "Yaw rate, set to NaN if not being used"]
31298    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31299    pub vel_yaw: [f32; 5],
31300    #[doc = "MAV_CMD command id of waypoint, set to UINT16_MAX if not being used."]
31301    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31302    pub command: [u16; 5],
31303    #[doc = "Number of valid points (up-to 5 waypoints are possible)"]
31304    pub valid_points: u8,
31305}
31306impl TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA {
31307    pub const ENCODED_LEN: usize = 239usize;
31308    pub const DEFAULT: Self = Self {
31309        time_usec: 0_u64,
31310        pos_x: [0.0_f32; 5usize],
31311        pos_y: [0.0_f32; 5usize],
31312        pos_z: [0.0_f32; 5usize],
31313        vel_x: [0.0_f32; 5usize],
31314        vel_y: [0.0_f32; 5usize],
31315        vel_z: [0.0_f32; 5usize],
31316        acc_x: [0.0_f32; 5usize],
31317        acc_y: [0.0_f32; 5usize],
31318        acc_z: [0.0_f32; 5usize],
31319        pos_yaw: [0.0_f32; 5usize],
31320        vel_yaw: [0.0_f32; 5usize],
31321        command: [0_u16; 5usize],
31322        valid_points: 0_u8,
31323    };
31324    #[cfg(feature = "arbitrary")]
31325    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31326        use arbitrary::{Arbitrary, Unstructured};
31327        let mut buf = [0u8; 1024];
31328        rng.fill_bytes(&mut buf);
31329        let mut unstructured = Unstructured::new(&buf);
31330        Self::arbitrary(&mut unstructured).unwrap_or_default()
31331    }
31332}
31333impl Default for TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA {
31334    fn default() -> Self {
31335        Self::DEFAULT.clone()
31336    }
31337}
31338impl MessageData for TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA {
31339    type Message = MavMessage;
31340    const ID: u32 = 332u32;
31341    const NAME: &'static str = "TRAJECTORY_REPRESENTATION_WAYPOINTS";
31342    const EXTRA_CRC: u8 = 236u8;
31343    const ENCODED_LEN: usize = 239usize;
31344    fn deser(
31345        _version: MavlinkVersion,
31346        __input: &[u8],
31347    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31348        let avail_len = __input.len();
31349        let mut payload_buf = [0; Self::ENCODED_LEN];
31350        let mut buf = if avail_len < Self::ENCODED_LEN {
31351            payload_buf[0..avail_len].copy_from_slice(__input);
31352            Bytes::new(&payload_buf)
31353        } else {
31354            Bytes::new(__input)
31355        };
31356        let mut __struct = Self::default();
31357        __struct.time_usec = buf.get_u64_le();
31358        for v in &mut __struct.pos_x {
31359            let val = buf.get_f32_le();
31360            *v = val;
31361        }
31362        for v in &mut __struct.pos_y {
31363            let val = buf.get_f32_le();
31364            *v = val;
31365        }
31366        for v in &mut __struct.pos_z {
31367            let val = buf.get_f32_le();
31368            *v = val;
31369        }
31370        for v in &mut __struct.vel_x {
31371            let val = buf.get_f32_le();
31372            *v = val;
31373        }
31374        for v in &mut __struct.vel_y {
31375            let val = buf.get_f32_le();
31376            *v = val;
31377        }
31378        for v in &mut __struct.vel_z {
31379            let val = buf.get_f32_le();
31380            *v = val;
31381        }
31382        for v in &mut __struct.acc_x {
31383            let val = buf.get_f32_le();
31384            *v = val;
31385        }
31386        for v in &mut __struct.acc_y {
31387            let val = buf.get_f32_le();
31388            *v = val;
31389        }
31390        for v in &mut __struct.acc_z {
31391            let val = buf.get_f32_le();
31392            *v = val;
31393        }
31394        for v in &mut __struct.pos_yaw {
31395            let val = buf.get_f32_le();
31396            *v = val;
31397        }
31398        for v in &mut __struct.vel_yaw {
31399            let val = buf.get_f32_le();
31400            *v = val;
31401        }
31402        for v in &mut __struct.command {
31403            let val = buf.get_u16_le();
31404            *v = val;
31405        }
31406        __struct.valid_points = buf.get_u8();
31407        Ok(__struct)
31408    }
31409    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31410        let mut __tmp = BytesMut::new(bytes);
31411        #[allow(clippy::absurd_extreme_comparisons)]
31412        #[allow(unused_comparisons)]
31413        if __tmp.remaining() < Self::ENCODED_LEN {
31414            panic!(
31415                "buffer is too small (need {} bytes, but got {})",
31416                Self::ENCODED_LEN,
31417                __tmp.remaining(),
31418            )
31419        }
31420        __tmp.put_u64_le(self.time_usec);
31421        for val in &self.pos_x {
31422            __tmp.put_f32_le(*val);
31423        }
31424        for val in &self.pos_y {
31425            __tmp.put_f32_le(*val);
31426        }
31427        for val in &self.pos_z {
31428            __tmp.put_f32_le(*val);
31429        }
31430        for val in &self.vel_x {
31431            __tmp.put_f32_le(*val);
31432        }
31433        for val in &self.vel_y {
31434            __tmp.put_f32_le(*val);
31435        }
31436        for val in &self.vel_z {
31437            __tmp.put_f32_le(*val);
31438        }
31439        for val in &self.acc_x {
31440            __tmp.put_f32_le(*val);
31441        }
31442        for val in &self.acc_y {
31443            __tmp.put_f32_le(*val);
31444        }
31445        for val in &self.acc_z {
31446            __tmp.put_f32_le(*val);
31447        }
31448        for val in &self.pos_yaw {
31449            __tmp.put_f32_le(*val);
31450        }
31451        for val in &self.vel_yaw {
31452            __tmp.put_f32_le(*val);
31453        }
31454        for val in &self.command {
31455            __tmp.put_u16_le(*val);
31456        }
31457        __tmp.put_u8(self.valid_points);
31458        if matches!(version, MavlinkVersion::V2) {
31459            let len = __tmp.len();
31460            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31461        } else {
31462            __tmp.len()
31463        }
31464    }
31465}
31466#[doc = "Message for transporting \"arbitrary\" variable-length data from one component to another (broadcast is not forbidden, but discouraged). The encoding of the data is usually extension specific, i.e. determined by the source, and is usually not documented as part of the MAVLink specification."]
31467#[doc = ""]
31468#[doc = "ID: 385"]
31469#[derive(Debug, Clone, PartialEq)]
31470#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31471#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31472pub struct TUNNEL_DATA {
31473    #[doc = "A code that identifies the content of the payload (0 for unknown, which is the default). If this code is less than 32768, it is a 'registered' payload type and the corresponding code should be added to the MAV_TUNNEL_PAYLOAD_TYPE enum. Software creators can register blocks of types as needed. Codes greater than 32767 are considered local experiments and should not be checked in to any widely distributed codebase."]
31474    pub payload_type: MavTunnelPayloadType,
31475    #[doc = "System ID (can be 0 for broadcast, but this is discouraged)"]
31476    pub target_system: u8,
31477    #[doc = "Component ID (can be 0 for broadcast, but this is discouraged)"]
31478    pub target_component: u8,
31479    #[doc = "Length of the data transported in payload"]
31480    pub payload_length: u8,
31481    #[doc = "Variable length payload. The payload length is defined by payload_length. The entire content of this block is opaque unless you understand the encoding specified by payload_type."]
31482    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31483    pub payload: [u8; 128],
31484}
31485impl TUNNEL_DATA {
31486    pub const ENCODED_LEN: usize = 133usize;
31487    pub const DEFAULT: Self = Self {
31488        payload_type: MavTunnelPayloadType::DEFAULT,
31489        target_system: 0_u8,
31490        target_component: 0_u8,
31491        payload_length: 0_u8,
31492        payload: [0_u8; 128usize],
31493    };
31494    #[cfg(feature = "arbitrary")]
31495    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31496        use arbitrary::{Arbitrary, Unstructured};
31497        let mut buf = [0u8; 1024];
31498        rng.fill_bytes(&mut buf);
31499        let mut unstructured = Unstructured::new(&buf);
31500        Self::arbitrary(&mut unstructured).unwrap_or_default()
31501    }
31502}
31503impl Default for TUNNEL_DATA {
31504    fn default() -> Self {
31505        Self::DEFAULT.clone()
31506    }
31507}
31508impl MessageData for TUNNEL_DATA {
31509    type Message = MavMessage;
31510    const ID: u32 = 385u32;
31511    const NAME: &'static str = "TUNNEL";
31512    const EXTRA_CRC: u8 = 147u8;
31513    const ENCODED_LEN: usize = 133usize;
31514    fn deser(
31515        _version: MavlinkVersion,
31516        __input: &[u8],
31517    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31518        let avail_len = __input.len();
31519        let mut payload_buf = [0; Self::ENCODED_LEN];
31520        let mut buf = if avail_len < Self::ENCODED_LEN {
31521            payload_buf[0..avail_len].copy_from_slice(__input);
31522            Bytes::new(&payload_buf)
31523        } else {
31524            Bytes::new(__input)
31525        };
31526        let mut __struct = Self::default();
31527        let tmp = buf.get_u16_le();
31528        __struct.payload_type = FromPrimitive::from_u16(tmp).ok_or(
31529            ::mavlink_core::error::ParserError::InvalidEnum {
31530                enum_type: "MavTunnelPayloadType",
31531                value: tmp as u32,
31532            },
31533        )?;
31534        __struct.target_system = buf.get_u8();
31535        __struct.target_component = buf.get_u8();
31536        __struct.payload_length = buf.get_u8();
31537        for v in &mut __struct.payload {
31538            let val = buf.get_u8();
31539            *v = val;
31540        }
31541        Ok(__struct)
31542    }
31543    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31544        let mut __tmp = BytesMut::new(bytes);
31545        #[allow(clippy::absurd_extreme_comparisons)]
31546        #[allow(unused_comparisons)]
31547        if __tmp.remaining() < Self::ENCODED_LEN {
31548            panic!(
31549                "buffer is too small (need {} bytes, but got {})",
31550                Self::ENCODED_LEN,
31551                __tmp.remaining(),
31552            )
31553        }
31554        __tmp.put_u16_le(self.payload_type as u16);
31555        __tmp.put_u8(self.target_system);
31556        __tmp.put_u8(self.target_component);
31557        __tmp.put_u8(self.payload_length);
31558        for val in &self.payload {
31559            __tmp.put_u8(*val);
31560        }
31561        if matches!(version, MavlinkVersion::V2) {
31562            let len = __tmp.len();
31563            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31564        } else {
31565            __tmp.len()
31566        }
31567    }
31568}
31569#[doc = "General information describing a particular UAVCAN node. Please refer to the definition of the UAVCAN service \"uavcan.protocol.GetNodeInfo\" for the background information. This message should be emitted by the system whenever a new node appears online, or an existing node reboots. Additionally, it can be emitted upon request from the other end of the MAVLink channel (see MAV_CMD_UAVCAN_GET_NODE_INFO). It is also not prohibited to emit this message unconditionally at a low frequency. The UAVCAN specification is available at <http://uavcan.org>."]
31570#[doc = ""]
31571#[doc = "ID: 311"]
31572#[derive(Debug, Clone, PartialEq)]
31573#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31574#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31575pub struct UAVCAN_NODE_INFO_DATA {
31576    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
31577    pub time_usec: u64,
31578    #[doc = "Time since the start-up of the node."]
31579    pub uptime_sec: u32,
31580    #[doc = "Version control system (VCS) revision identifier (e.g. git short commit hash). 0 if unknown."]
31581    pub sw_vcs_commit: u32,
31582    #[doc = "Node name string. For example, \"sapog.px4.io\"."]
31583    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31584    pub name: [u8; 80],
31585    #[doc = "Hardware major version number."]
31586    pub hw_version_major: u8,
31587    #[doc = "Hardware minor version number."]
31588    pub hw_version_minor: u8,
31589    #[doc = "Hardware unique 128-bit ID."]
31590    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31591    pub hw_unique_id: [u8; 16],
31592    #[doc = "Software major version number."]
31593    pub sw_version_major: u8,
31594    #[doc = "Software minor version number."]
31595    pub sw_version_minor: u8,
31596}
31597impl UAVCAN_NODE_INFO_DATA {
31598    pub const ENCODED_LEN: usize = 116usize;
31599    pub const DEFAULT: Self = Self {
31600        time_usec: 0_u64,
31601        uptime_sec: 0_u32,
31602        sw_vcs_commit: 0_u32,
31603        name: [0_u8; 80usize],
31604        hw_version_major: 0_u8,
31605        hw_version_minor: 0_u8,
31606        hw_unique_id: [0_u8; 16usize],
31607        sw_version_major: 0_u8,
31608        sw_version_minor: 0_u8,
31609    };
31610    #[cfg(feature = "arbitrary")]
31611    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31612        use arbitrary::{Arbitrary, Unstructured};
31613        let mut buf = [0u8; 1024];
31614        rng.fill_bytes(&mut buf);
31615        let mut unstructured = Unstructured::new(&buf);
31616        Self::arbitrary(&mut unstructured).unwrap_or_default()
31617    }
31618}
31619impl Default for UAVCAN_NODE_INFO_DATA {
31620    fn default() -> Self {
31621        Self::DEFAULT.clone()
31622    }
31623}
31624impl MessageData for UAVCAN_NODE_INFO_DATA {
31625    type Message = MavMessage;
31626    const ID: u32 = 311u32;
31627    const NAME: &'static str = "UAVCAN_NODE_INFO";
31628    const EXTRA_CRC: u8 = 95u8;
31629    const ENCODED_LEN: usize = 116usize;
31630    fn deser(
31631        _version: MavlinkVersion,
31632        __input: &[u8],
31633    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31634        let avail_len = __input.len();
31635        let mut payload_buf = [0; Self::ENCODED_LEN];
31636        let mut buf = if avail_len < Self::ENCODED_LEN {
31637            payload_buf[0..avail_len].copy_from_slice(__input);
31638            Bytes::new(&payload_buf)
31639        } else {
31640            Bytes::new(__input)
31641        };
31642        let mut __struct = Self::default();
31643        __struct.time_usec = buf.get_u64_le();
31644        __struct.uptime_sec = buf.get_u32_le();
31645        __struct.sw_vcs_commit = buf.get_u32_le();
31646        for v in &mut __struct.name {
31647            let val = buf.get_u8();
31648            *v = val;
31649        }
31650        __struct.hw_version_major = buf.get_u8();
31651        __struct.hw_version_minor = buf.get_u8();
31652        for v in &mut __struct.hw_unique_id {
31653            let val = buf.get_u8();
31654            *v = val;
31655        }
31656        __struct.sw_version_major = buf.get_u8();
31657        __struct.sw_version_minor = buf.get_u8();
31658        Ok(__struct)
31659    }
31660    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31661        let mut __tmp = BytesMut::new(bytes);
31662        #[allow(clippy::absurd_extreme_comparisons)]
31663        #[allow(unused_comparisons)]
31664        if __tmp.remaining() < Self::ENCODED_LEN {
31665            panic!(
31666                "buffer is too small (need {} bytes, but got {})",
31667                Self::ENCODED_LEN,
31668                __tmp.remaining(),
31669            )
31670        }
31671        __tmp.put_u64_le(self.time_usec);
31672        __tmp.put_u32_le(self.uptime_sec);
31673        __tmp.put_u32_le(self.sw_vcs_commit);
31674        for val in &self.name {
31675            __tmp.put_u8(*val);
31676        }
31677        __tmp.put_u8(self.hw_version_major);
31678        __tmp.put_u8(self.hw_version_minor);
31679        for val in &self.hw_unique_id {
31680            __tmp.put_u8(*val);
31681        }
31682        __tmp.put_u8(self.sw_version_major);
31683        __tmp.put_u8(self.sw_version_minor);
31684        if matches!(version, MavlinkVersion::V2) {
31685            let len = __tmp.len();
31686            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31687        } else {
31688            __tmp.len()
31689        }
31690    }
31691}
31692#[doc = "General status information of an UAVCAN node. Please refer to the definition of the UAVCAN message \"uavcan.protocol.NodeStatus\" for the background information. The UAVCAN specification is available at <http://uavcan.org>."]
31693#[doc = ""]
31694#[doc = "ID: 310"]
31695#[derive(Debug, Clone, PartialEq)]
31696#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31697#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31698pub struct UAVCAN_NODE_STATUS_DATA {
31699    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
31700    pub time_usec: u64,
31701    #[doc = "Time since the start-up of the node."]
31702    pub uptime_sec: u32,
31703    #[doc = "Vendor-specific status information."]
31704    pub vendor_specific_status_code: u16,
31705    #[doc = "Generalized node health status."]
31706    pub health: UavcanNodeHealth,
31707    #[doc = "Generalized operating mode."]
31708    pub mode: UavcanNodeMode,
31709    #[doc = "Not used currently."]
31710    pub sub_mode: u8,
31711}
31712impl UAVCAN_NODE_STATUS_DATA {
31713    pub const ENCODED_LEN: usize = 17usize;
31714    pub const DEFAULT: Self = Self {
31715        time_usec: 0_u64,
31716        uptime_sec: 0_u32,
31717        vendor_specific_status_code: 0_u16,
31718        health: UavcanNodeHealth::DEFAULT,
31719        mode: UavcanNodeMode::DEFAULT,
31720        sub_mode: 0_u8,
31721    };
31722    #[cfg(feature = "arbitrary")]
31723    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31724        use arbitrary::{Arbitrary, Unstructured};
31725        let mut buf = [0u8; 1024];
31726        rng.fill_bytes(&mut buf);
31727        let mut unstructured = Unstructured::new(&buf);
31728        Self::arbitrary(&mut unstructured).unwrap_or_default()
31729    }
31730}
31731impl Default for UAVCAN_NODE_STATUS_DATA {
31732    fn default() -> Self {
31733        Self::DEFAULT.clone()
31734    }
31735}
31736impl MessageData for UAVCAN_NODE_STATUS_DATA {
31737    type Message = MavMessage;
31738    const ID: u32 = 310u32;
31739    const NAME: &'static str = "UAVCAN_NODE_STATUS";
31740    const EXTRA_CRC: u8 = 28u8;
31741    const ENCODED_LEN: usize = 17usize;
31742    fn deser(
31743        _version: MavlinkVersion,
31744        __input: &[u8],
31745    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31746        let avail_len = __input.len();
31747        let mut payload_buf = [0; Self::ENCODED_LEN];
31748        let mut buf = if avail_len < Self::ENCODED_LEN {
31749            payload_buf[0..avail_len].copy_from_slice(__input);
31750            Bytes::new(&payload_buf)
31751        } else {
31752            Bytes::new(__input)
31753        };
31754        let mut __struct = Self::default();
31755        __struct.time_usec = buf.get_u64_le();
31756        __struct.uptime_sec = buf.get_u32_le();
31757        __struct.vendor_specific_status_code = buf.get_u16_le();
31758        let tmp = buf.get_u8();
31759        __struct.health =
31760            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
31761                enum_type: "UavcanNodeHealth",
31762                value: tmp as u32,
31763            })?;
31764        let tmp = buf.get_u8();
31765        __struct.mode =
31766            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
31767                enum_type: "UavcanNodeMode",
31768                value: tmp as u32,
31769            })?;
31770        __struct.sub_mode = buf.get_u8();
31771        Ok(__struct)
31772    }
31773    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31774        let mut __tmp = BytesMut::new(bytes);
31775        #[allow(clippy::absurd_extreme_comparisons)]
31776        #[allow(unused_comparisons)]
31777        if __tmp.remaining() < Self::ENCODED_LEN {
31778            panic!(
31779                "buffer is too small (need {} bytes, but got {})",
31780                Self::ENCODED_LEN,
31781                __tmp.remaining(),
31782            )
31783        }
31784        __tmp.put_u64_le(self.time_usec);
31785        __tmp.put_u32_le(self.uptime_sec);
31786        __tmp.put_u16_le(self.vendor_specific_status_code);
31787        __tmp.put_u8(self.health as u8);
31788        __tmp.put_u8(self.mode as u8);
31789        __tmp.put_u8(self.sub_mode);
31790        if matches!(version, MavlinkVersion::V2) {
31791            let len = __tmp.len();
31792            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31793        } else {
31794            __tmp.len()
31795        }
31796    }
31797}
31798#[doc = "The global position resulting from GPS and sensor fusion."]
31799#[doc = ""]
31800#[doc = "ID: 340"]
31801#[derive(Debug, Clone, PartialEq)]
31802#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31803#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31804pub struct UTM_GLOBAL_POSITION_DATA {
31805    #[doc = "Time of applicability of position (microseconds since UNIX epoch)."]
31806    pub time: u64,
31807    #[doc = "Latitude (WGS84)"]
31808    pub lat: i32,
31809    #[doc = "Longitude (WGS84)"]
31810    pub lon: i32,
31811    #[doc = "Altitude (WGS84)"]
31812    pub alt: i32,
31813    #[doc = "Altitude above ground"]
31814    pub relative_alt: i32,
31815    #[doc = "Next waypoint, latitude (WGS84)"]
31816    pub next_lat: i32,
31817    #[doc = "Next waypoint, longitude (WGS84)"]
31818    pub next_lon: i32,
31819    #[doc = "Next waypoint, altitude (WGS84)"]
31820    pub next_alt: i32,
31821    #[doc = "Ground X speed (latitude, positive north)"]
31822    pub vx: i16,
31823    #[doc = "Ground Y speed (longitude, positive east)"]
31824    pub vy: i16,
31825    #[doc = "Ground Z speed (altitude, positive down)"]
31826    pub vz: i16,
31827    #[doc = "Horizontal position uncertainty (standard deviation)"]
31828    pub h_acc: u16,
31829    #[doc = "Altitude uncertainty (standard deviation)"]
31830    pub v_acc: u16,
31831    #[doc = "Speed uncertainty (standard deviation)"]
31832    pub vel_acc: u16,
31833    #[doc = "Time until next update. Set to 0 if unknown or in data driven mode."]
31834    pub update_rate: u16,
31835    #[doc = "Unique UAS ID."]
31836    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31837    pub uas_id: [u8; 18],
31838    #[doc = "Flight state"]
31839    pub flight_state: UtmFlightState,
31840    #[doc = "Bitwise OR combination of the data available flags."]
31841    pub flags: UtmDataAvailFlags,
31842}
31843impl UTM_GLOBAL_POSITION_DATA {
31844    pub const ENCODED_LEN: usize = 70usize;
31845    pub const DEFAULT: Self = Self {
31846        time: 0_u64,
31847        lat: 0_i32,
31848        lon: 0_i32,
31849        alt: 0_i32,
31850        relative_alt: 0_i32,
31851        next_lat: 0_i32,
31852        next_lon: 0_i32,
31853        next_alt: 0_i32,
31854        vx: 0_i16,
31855        vy: 0_i16,
31856        vz: 0_i16,
31857        h_acc: 0_u16,
31858        v_acc: 0_u16,
31859        vel_acc: 0_u16,
31860        update_rate: 0_u16,
31861        uas_id: [0_u8; 18usize],
31862        flight_state: UtmFlightState::DEFAULT,
31863        flags: UtmDataAvailFlags::DEFAULT,
31864    };
31865    #[cfg(feature = "arbitrary")]
31866    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31867        use arbitrary::{Arbitrary, Unstructured};
31868        let mut buf = [0u8; 1024];
31869        rng.fill_bytes(&mut buf);
31870        let mut unstructured = Unstructured::new(&buf);
31871        Self::arbitrary(&mut unstructured).unwrap_or_default()
31872    }
31873}
31874impl Default for UTM_GLOBAL_POSITION_DATA {
31875    fn default() -> Self {
31876        Self::DEFAULT.clone()
31877    }
31878}
31879impl MessageData for UTM_GLOBAL_POSITION_DATA {
31880    type Message = MavMessage;
31881    const ID: u32 = 340u32;
31882    const NAME: &'static str = "UTM_GLOBAL_POSITION";
31883    const EXTRA_CRC: u8 = 99u8;
31884    const ENCODED_LEN: usize = 70usize;
31885    fn deser(
31886        _version: MavlinkVersion,
31887        __input: &[u8],
31888    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31889        let avail_len = __input.len();
31890        let mut payload_buf = [0; Self::ENCODED_LEN];
31891        let mut buf = if avail_len < Self::ENCODED_LEN {
31892            payload_buf[0..avail_len].copy_from_slice(__input);
31893            Bytes::new(&payload_buf)
31894        } else {
31895            Bytes::new(__input)
31896        };
31897        let mut __struct = Self::default();
31898        __struct.time = buf.get_u64_le();
31899        __struct.lat = buf.get_i32_le();
31900        __struct.lon = buf.get_i32_le();
31901        __struct.alt = buf.get_i32_le();
31902        __struct.relative_alt = buf.get_i32_le();
31903        __struct.next_lat = buf.get_i32_le();
31904        __struct.next_lon = buf.get_i32_le();
31905        __struct.next_alt = buf.get_i32_le();
31906        __struct.vx = buf.get_i16_le();
31907        __struct.vy = buf.get_i16_le();
31908        __struct.vz = buf.get_i16_le();
31909        __struct.h_acc = buf.get_u16_le();
31910        __struct.v_acc = buf.get_u16_le();
31911        __struct.vel_acc = buf.get_u16_le();
31912        __struct.update_rate = buf.get_u16_le();
31913        for v in &mut __struct.uas_id {
31914            let val = buf.get_u8();
31915            *v = val;
31916        }
31917        let tmp = buf.get_u8();
31918        __struct.flight_state =
31919            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
31920                enum_type: "UtmFlightState",
31921                value: tmp as u32,
31922            })?;
31923        let tmp = buf.get_u8();
31924        __struct.flags = UtmDataAvailFlags::from_bits(tmp & UtmDataAvailFlags::all().bits())
31925            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
31926                flag_type: "UtmDataAvailFlags",
31927                value: tmp as u32,
31928            })?;
31929        Ok(__struct)
31930    }
31931    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31932        let mut __tmp = BytesMut::new(bytes);
31933        #[allow(clippy::absurd_extreme_comparisons)]
31934        #[allow(unused_comparisons)]
31935        if __tmp.remaining() < Self::ENCODED_LEN {
31936            panic!(
31937                "buffer is too small (need {} bytes, but got {})",
31938                Self::ENCODED_LEN,
31939                __tmp.remaining(),
31940            )
31941        }
31942        __tmp.put_u64_le(self.time);
31943        __tmp.put_i32_le(self.lat);
31944        __tmp.put_i32_le(self.lon);
31945        __tmp.put_i32_le(self.alt);
31946        __tmp.put_i32_le(self.relative_alt);
31947        __tmp.put_i32_le(self.next_lat);
31948        __tmp.put_i32_le(self.next_lon);
31949        __tmp.put_i32_le(self.next_alt);
31950        __tmp.put_i16_le(self.vx);
31951        __tmp.put_i16_le(self.vy);
31952        __tmp.put_i16_le(self.vz);
31953        __tmp.put_u16_le(self.h_acc);
31954        __tmp.put_u16_le(self.v_acc);
31955        __tmp.put_u16_le(self.vel_acc);
31956        __tmp.put_u16_le(self.update_rate);
31957        for val in &self.uas_id {
31958            __tmp.put_u8(*val);
31959        }
31960        __tmp.put_u8(self.flight_state as u8);
31961        __tmp.put_u8(self.flags.bits());
31962        if matches!(version, MavlinkVersion::V2) {
31963            let len = __tmp.len();
31964            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31965        } else {
31966            __tmp.len()
31967        }
31968    }
31969}
31970#[doc = "Message implementing parts of the V2 payload specs in V1 frames for transitional support."]
31971#[doc = ""]
31972#[doc = "ID: 248"]
31973#[derive(Debug, Clone, PartialEq)]
31974#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31975#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31976pub struct V2_EXTENSION_DATA {
31977    #[doc = "A code that identifies the software component that understands this message (analogous to USB device classes or mime type strings). If this code is less than 32768, it is considered a 'registered' protocol extension and the corresponding entry should be added to <https://github.com/mavlink/mavlink/definition_files/extension_message_ids.xml>. Software creators can register blocks of message IDs as needed (useful for GCS specific metadata, etc...). Message_types greater than 32767 are considered local experiments and should not be checked in to any widely distributed codebase."]
31978    pub message_type: u16,
31979    #[doc = "Network ID (0 for broadcast)"]
31980    pub target_network: u8,
31981    #[doc = "System ID (0 for broadcast)"]
31982    pub target_system: u8,
31983    #[doc = "Component ID (0 for broadcast)"]
31984    pub target_component: u8,
31985    #[doc = "Variable length payload. The length must be encoded in the payload as part of the message_type protocol, e.g. by including the length as payload data, or by terminating the payload data with a non-zero marker. This is required in order to reconstruct zero-terminated payloads that are (or otherwise would be) trimmed by MAVLink 2 empty-byte truncation. The entire content of the payload block is opaque unless you understand the encoding message_type. The particular encoding used can be extension specific and might not always be documented as part of the MAVLink specification."]
31986    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31987    pub payload: [u8; 249],
31988}
31989impl V2_EXTENSION_DATA {
31990    pub const ENCODED_LEN: usize = 254usize;
31991    pub const DEFAULT: Self = Self {
31992        message_type: 0_u16,
31993        target_network: 0_u8,
31994        target_system: 0_u8,
31995        target_component: 0_u8,
31996        payload: [0_u8; 249usize],
31997    };
31998    #[cfg(feature = "arbitrary")]
31999    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32000        use arbitrary::{Arbitrary, Unstructured};
32001        let mut buf = [0u8; 1024];
32002        rng.fill_bytes(&mut buf);
32003        let mut unstructured = Unstructured::new(&buf);
32004        Self::arbitrary(&mut unstructured).unwrap_or_default()
32005    }
32006}
32007impl Default for V2_EXTENSION_DATA {
32008    fn default() -> Self {
32009        Self::DEFAULT.clone()
32010    }
32011}
32012impl MessageData for V2_EXTENSION_DATA {
32013    type Message = MavMessage;
32014    const ID: u32 = 248u32;
32015    const NAME: &'static str = "V2_EXTENSION";
32016    const EXTRA_CRC: u8 = 8u8;
32017    const ENCODED_LEN: usize = 254usize;
32018    fn deser(
32019        _version: MavlinkVersion,
32020        __input: &[u8],
32021    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32022        let avail_len = __input.len();
32023        let mut payload_buf = [0; Self::ENCODED_LEN];
32024        let mut buf = if avail_len < Self::ENCODED_LEN {
32025            payload_buf[0..avail_len].copy_from_slice(__input);
32026            Bytes::new(&payload_buf)
32027        } else {
32028            Bytes::new(__input)
32029        };
32030        let mut __struct = Self::default();
32031        __struct.message_type = buf.get_u16_le();
32032        __struct.target_network = buf.get_u8();
32033        __struct.target_system = buf.get_u8();
32034        __struct.target_component = buf.get_u8();
32035        for v in &mut __struct.payload {
32036            let val = buf.get_u8();
32037            *v = val;
32038        }
32039        Ok(__struct)
32040    }
32041    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32042        let mut __tmp = BytesMut::new(bytes);
32043        #[allow(clippy::absurd_extreme_comparisons)]
32044        #[allow(unused_comparisons)]
32045        if __tmp.remaining() < Self::ENCODED_LEN {
32046            panic!(
32047                "buffer is too small (need {} bytes, but got {})",
32048                Self::ENCODED_LEN,
32049                __tmp.remaining(),
32050            )
32051        }
32052        __tmp.put_u16_le(self.message_type);
32053        __tmp.put_u8(self.target_network);
32054        __tmp.put_u8(self.target_system);
32055        __tmp.put_u8(self.target_component);
32056        for val in &self.payload {
32057            __tmp.put_u8(*val);
32058        }
32059        if matches!(version, MavlinkVersion::V2) {
32060            let len = __tmp.len();
32061            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32062        } else {
32063            __tmp.len()
32064        }
32065    }
32066}
32067#[doc = "Metrics typically displayed on a HUD for fixed wing aircraft."]
32068#[doc = ""]
32069#[doc = "ID: 74"]
32070#[derive(Debug, Clone, PartialEq)]
32071#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32072#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32073pub struct VFR_HUD_DATA {
32074    #[doc = "Vehicle speed in form appropriate for vehicle type. For standard aircraft this is typically calibrated airspeed (CAS) or indicated airspeed (IAS) - either of which can be used by a pilot to estimate stall speed."]
32075    pub airspeed: f32,
32076    #[doc = "Current ground speed."]
32077    pub groundspeed: f32,
32078    #[doc = "Current altitude (MSL)."]
32079    pub alt: f32,
32080    #[doc = "Current climb rate."]
32081    pub climb: f32,
32082    #[doc = "Current heading in compass units (0-360, 0=north)."]
32083    pub heading: i16,
32084    #[doc = "Current throttle setting (0 to 100)."]
32085    pub throttle: u16,
32086}
32087impl VFR_HUD_DATA {
32088    pub const ENCODED_LEN: usize = 20usize;
32089    pub const DEFAULT: Self = Self {
32090        airspeed: 0.0_f32,
32091        groundspeed: 0.0_f32,
32092        alt: 0.0_f32,
32093        climb: 0.0_f32,
32094        heading: 0_i16,
32095        throttle: 0_u16,
32096    };
32097    #[cfg(feature = "arbitrary")]
32098    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32099        use arbitrary::{Arbitrary, Unstructured};
32100        let mut buf = [0u8; 1024];
32101        rng.fill_bytes(&mut buf);
32102        let mut unstructured = Unstructured::new(&buf);
32103        Self::arbitrary(&mut unstructured).unwrap_or_default()
32104    }
32105}
32106impl Default for VFR_HUD_DATA {
32107    fn default() -> Self {
32108        Self::DEFAULT.clone()
32109    }
32110}
32111impl MessageData for VFR_HUD_DATA {
32112    type Message = MavMessage;
32113    const ID: u32 = 74u32;
32114    const NAME: &'static str = "VFR_HUD";
32115    const EXTRA_CRC: u8 = 20u8;
32116    const ENCODED_LEN: usize = 20usize;
32117    fn deser(
32118        _version: MavlinkVersion,
32119        __input: &[u8],
32120    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32121        let avail_len = __input.len();
32122        let mut payload_buf = [0; Self::ENCODED_LEN];
32123        let mut buf = if avail_len < Self::ENCODED_LEN {
32124            payload_buf[0..avail_len].copy_from_slice(__input);
32125            Bytes::new(&payload_buf)
32126        } else {
32127            Bytes::new(__input)
32128        };
32129        let mut __struct = Self::default();
32130        __struct.airspeed = buf.get_f32_le();
32131        __struct.groundspeed = buf.get_f32_le();
32132        __struct.alt = buf.get_f32_le();
32133        __struct.climb = buf.get_f32_le();
32134        __struct.heading = buf.get_i16_le();
32135        __struct.throttle = buf.get_u16_le();
32136        Ok(__struct)
32137    }
32138    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32139        let mut __tmp = BytesMut::new(bytes);
32140        #[allow(clippy::absurd_extreme_comparisons)]
32141        #[allow(unused_comparisons)]
32142        if __tmp.remaining() < Self::ENCODED_LEN {
32143            panic!(
32144                "buffer is too small (need {} bytes, but got {})",
32145                Self::ENCODED_LEN,
32146                __tmp.remaining(),
32147            )
32148        }
32149        __tmp.put_f32_le(self.airspeed);
32150        __tmp.put_f32_le(self.groundspeed);
32151        __tmp.put_f32_le(self.alt);
32152        __tmp.put_f32_le(self.climb);
32153        __tmp.put_i16_le(self.heading);
32154        __tmp.put_u16_le(self.throttle);
32155        if matches!(version, MavlinkVersion::V2) {
32156            let len = __tmp.len();
32157            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32158        } else {
32159            __tmp.len()
32160        }
32161    }
32162}
32163#[doc = "Vibration levels and accelerometer clipping."]
32164#[doc = ""]
32165#[doc = "ID: 241"]
32166#[derive(Debug, Clone, PartialEq)]
32167#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32168#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32169pub struct VIBRATION_DATA {
32170    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
32171    pub time_usec: u64,
32172    #[doc = "Vibration levels on X-axis"]
32173    pub vibration_x: f32,
32174    #[doc = "Vibration levels on Y-axis"]
32175    pub vibration_y: f32,
32176    #[doc = "Vibration levels on Z-axis"]
32177    pub vibration_z: f32,
32178    #[doc = "first accelerometer clipping count"]
32179    pub clipping_0: u32,
32180    #[doc = "second accelerometer clipping count"]
32181    pub clipping_1: u32,
32182    #[doc = "third accelerometer clipping count"]
32183    pub clipping_2: u32,
32184}
32185impl VIBRATION_DATA {
32186    pub const ENCODED_LEN: usize = 32usize;
32187    pub const DEFAULT: Self = Self {
32188        time_usec: 0_u64,
32189        vibration_x: 0.0_f32,
32190        vibration_y: 0.0_f32,
32191        vibration_z: 0.0_f32,
32192        clipping_0: 0_u32,
32193        clipping_1: 0_u32,
32194        clipping_2: 0_u32,
32195    };
32196    #[cfg(feature = "arbitrary")]
32197    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32198        use arbitrary::{Arbitrary, Unstructured};
32199        let mut buf = [0u8; 1024];
32200        rng.fill_bytes(&mut buf);
32201        let mut unstructured = Unstructured::new(&buf);
32202        Self::arbitrary(&mut unstructured).unwrap_or_default()
32203    }
32204}
32205impl Default for VIBRATION_DATA {
32206    fn default() -> Self {
32207        Self::DEFAULT.clone()
32208    }
32209}
32210impl MessageData for VIBRATION_DATA {
32211    type Message = MavMessage;
32212    const ID: u32 = 241u32;
32213    const NAME: &'static str = "VIBRATION";
32214    const EXTRA_CRC: u8 = 90u8;
32215    const ENCODED_LEN: usize = 32usize;
32216    fn deser(
32217        _version: MavlinkVersion,
32218        __input: &[u8],
32219    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32220        let avail_len = __input.len();
32221        let mut payload_buf = [0; Self::ENCODED_LEN];
32222        let mut buf = if avail_len < Self::ENCODED_LEN {
32223            payload_buf[0..avail_len].copy_from_slice(__input);
32224            Bytes::new(&payload_buf)
32225        } else {
32226            Bytes::new(__input)
32227        };
32228        let mut __struct = Self::default();
32229        __struct.time_usec = buf.get_u64_le();
32230        __struct.vibration_x = buf.get_f32_le();
32231        __struct.vibration_y = buf.get_f32_le();
32232        __struct.vibration_z = buf.get_f32_le();
32233        __struct.clipping_0 = buf.get_u32_le();
32234        __struct.clipping_1 = buf.get_u32_le();
32235        __struct.clipping_2 = buf.get_u32_le();
32236        Ok(__struct)
32237    }
32238    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32239        let mut __tmp = BytesMut::new(bytes);
32240        #[allow(clippy::absurd_extreme_comparisons)]
32241        #[allow(unused_comparisons)]
32242        if __tmp.remaining() < Self::ENCODED_LEN {
32243            panic!(
32244                "buffer is too small (need {} bytes, but got {})",
32245                Self::ENCODED_LEN,
32246                __tmp.remaining(),
32247            )
32248        }
32249        __tmp.put_u64_le(self.time_usec);
32250        __tmp.put_f32_le(self.vibration_x);
32251        __tmp.put_f32_le(self.vibration_y);
32252        __tmp.put_f32_le(self.vibration_z);
32253        __tmp.put_u32_le(self.clipping_0);
32254        __tmp.put_u32_le(self.clipping_1);
32255        __tmp.put_u32_le(self.clipping_2);
32256        if matches!(version, MavlinkVersion::V2) {
32257            let len = __tmp.len();
32258            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32259        } else {
32260            __tmp.len()
32261        }
32262    }
32263}
32264#[doc = "Global position estimate from a Vicon motion system source."]
32265#[doc = ""]
32266#[doc = "ID: 104"]
32267#[derive(Debug, Clone, PartialEq)]
32268#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32269#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32270pub struct VICON_POSITION_ESTIMATE_DATA {
32271    #[doc = "Timestamp (UNIX time or time since system boot)"]
32272    pub usec: u64,
32273    #[doc = "Global X position"]
32274    pub x: f32,
32275    #[doc = "Global Y position"]
32276    pub y: f32,
32277    #[doc = "Global Z position"]
32278    pub z: f32,
32279    #[doc = "Roll angle"]
32280    pub roll: f32,
32281    #[doc = "Pitch angle"]
32282    pub pitch: f32,
32283    #[doc = "Yaw angle"]
32284    pub yaw: f32,
32285    #[doc = "Row-major representation of 6x6 pose cross-covariance matrix upper right triangle (states: x, y, z, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
32286    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
32287    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32288    pub covariance: [f32; 21],
32289}
32290impl VICON_POSITION_ESTIMATE_DATA {
32291    pub const ENCODED_LEN: usize = 116usize;
32292    pub const DEFAULT: Self = Self {
32293        usec: 0_u64,
32294        x: 0.0_f32,
32295        y: 0.0_f32,
32296        z: 0.0_f32,
32297        roll: 0.0_f32,
32298        pitch: 0.0_f32,
32299        yaw: 0.0_f32,
32300        covariance: [0.0_f32; 21usize],
32301    };
32302    #[cfg(feature = "arbitrary")]
32303    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32304        use arbitrary::{Arbitrary, Unstructured};
32305        let mut buf = [0u8; 1024];
32306        rng.fill_bytes(&mut buf);
32307        let mut unstructured = Unstructured::new(&buf);
32308        Self::arbitrary(&mut unstructured).unwrap_or_default()
32309    }
32310}
32311impl Default for VICON_POSITION_ESTIMATE_DATA {
32312    fn default() -> Self {
32313        Self::DEFAULT.clone()
32314    }
32315}
32316impl MessageData for VICON_POSITION_ESTIMATE_DATA {
32317    type Message = MavMessage;
32318    const ID: u32 = 104u32;
32319    const NAME: &'static str = "VICON_POSITION_ESTIMATE";
32320    const EXTRA_CRC: u8 = 56u8;
32321    const ENCODED_LEN: usize = 116usize;
32322    fn deser(
32323        _version: MavlinkVersion,
32324        __input: &[u8],
32325    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32326        let avail_len = __input.len();
32327        let mut payload_buf = [0; Self::ENCODED_LEN];
32328        let mut buf = if avail_len < Self::ENCODED_LEN {
32329            payload_buf[0..avail_len].copy_from_slice(__input);
32330            Bytes::new(&payload_buf)
32331        } else {
32332            Bytes::new(__input)
32333        };
32334        let mut __struct = Self::default();
32335        __struct.usec = buf.get_u64_le();
32336        __struct.x = buf.get_f32_le();
32337        __struct.y = buf.get_f32_le();
32338        __struct.z = buf.get_f32_le();
32339        __struct.roll = buf.get_f32_le();
32340        __struct.pitch = buf.get_f32_le();
32341        __struct.yaw = buf.get_f32_le();
32342        for v in &mut __struct.covariance {
32343            let val = buf.get_f32_le();
32344            *v = val;
32345        }
32346        Ok(__struct)
32347    }
32348    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32349        let mut __tmp = BytesMut::new(bytes);
32350        #[allow(clippy::absurd_extreme_comparisons)]
32351        #[allow(unused_comparisons)]
32352        if __tmp.remaining() < Self::ENCODED_LEN {
32353            panic!(
32354                "buffer is too small (need {} bytes, but got {})",
32355                Self::ENCODED_LEN,
32356                __tmp.remaining(),
32357            )
32358        }
32359        __tmp.put_u64_le(self.usec);
32360        __tmp.put_f32_le(self.x);
32361        __tmp.put_f32_le(self.y);
32362        __tmp.put_f32_le(self.z);
32363        __tmp.put_f32_le(self.roll);
32364        __tmp.put_f32_le(self.pitch);
32365        __tmp.put_f32_le(self.yaw);
32366        if matches!(version, MavlinkVersion::V2) {
32367            for val in &self.covariance {
32368                __tmp.put_f32_le(*val);
32369            }
32370            let len = __tmp.len();
32371            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32372        } else {
32373            __tmp.len()
32374        }
32375    }
32376}
32377#[doc = "Information about video stream. It may be requested using MAV_CMD_REQUEST_MESSAGE, where param2 indicates the video stream id: 0 for all streams, 1 for first, 2 for second, etc."]
32378#[doc = ""]
32379#[doc = "ID: 269"]
32380#[derive(Debug, Clone, PartialEq)]
32381#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32382#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32383pub struct VIDEO_STREAM_INFORMATION_DATA {
32384    #[doc = "Frame rate."]
32385    pub framerate: f32,
32386    #[doc = "Bit rate."]
32387    pub bitrate: u32,
32388    #[doc = "Bitmap of stream status flags."]
32389    pub flags: VideoStreamStatusFlags,
32390    #[doc = "Horizontal resolution."]
32391    pub resolution_h: u16,
32392    #[doc = "Vertical resolution."]
32393    pub resolution_v: u16,
32394    #[doc = "Video image rotation clockwise."]
32395    pub rotation: u16,
32396    #[doc = "Horizontal Field of view."]
32397    pub hfov: u16,
32398    #[doc = "Video Stream ID (1 for first, 2 for second, etc.)"]
32399    pub stream_id: u8,
32400    #[doc = "Number of streams available."]
32401    pub count: u8,
32402    #[doc = "Type of stream."]
32403    pub mavtype: VideoStreamType,
32404    #[doc = "Stream name."]
32405    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32406    pub name: [u8; 32],
32407    #[doc = "Video stream URI (TCP or RTSP URI ground station should connect to) or port number (UDP port ground station should listen to)."]
32408    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32409    pub uri: [u8; 160],
32410    #[doc = "Encoding of stream."]
32411    #[cfg_attr(feature = "serde", serde(default))]
32412    pub encoding: VideoStreamEncoding,
32413    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
32414    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
32415    pub camera_device_id: u8,
32416}
32417impl VIDEO_STREAM_INFORMATION_DATA {
32418    pub const ENCODED_LEN: usize = 215usize;
32419    pub const DEFAULT: Self = Self {
32420        framerate: 0.0_f32,
32421        bitrate: 0_u32,
32422        flags: VideoStreamStatusFlags::DEFAULT,
32423        resolution_h: 0_u16,
32424        resolution_v: 0_u16,
32425        rotation: 0_u16,
32426        hfov: 0_u16,
32427        stream_id: 0_u8,
32428        count: 0_u8,
32429        mavtype: VideoStreamType::DEFAULT,
32430        name: [0_u8; 32usize],
32431        uri: [0_u8; 160usize],
32432        encoding: VideoStreamEncoding::DEFAULT,
32433        camera_device_id: 0_u8,
32434    };
32435    #[cfg(feature = "arbitrary")]
32436    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32437        use arbitrary::{Arbitrary, Unstructured};
32438        let mut buf = [0u8; 1024];
32439        rng.fill_bytes(&mut buf);
32440        let mut unstructured = Unstructured::new(&buf);
32441        Self::arbitrary(&mut unstructured).unwrap_or_default()
32442    }
32443}
32444impl Default for VIDEO_STREAM_INFORMATION_DATA {
32445    fn default() -> Self {
32446        Self::DEFAULT.clone()
32447    }
32448}
32449impl MessageData for VIDEO_STREAM_INFORMATION_DATA {
32450    type Message = MavMessage;
32451    const ID: u32 = 269u32;
32452    const NAME: &'static str = "VIDEO_STREAM_INFORMATION";
32453    const EXTRA_CRC: u8 = 109u8;
32454    const ENCODED_LEN: usize = 215usize;
32455    fn deser(
32456        _version: MavlinkVersion,
32457        __input: &[u8],
32458    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32459        let avail_len = __input.len();
32460        let mut payload_buf = [0; Self::ENCODED_LEN];
32461        let mut buf = if avail_len < Self::ENCODED_LEN {
32462            payload_buf[0..avail_len].copy_from_slice(__input);
32463            Bytes::new(&payload_buf)
32464        } else {
32465            Bytes::new(__input)
32466        };
32467        let mut __struct = Self::default();
32468        __struct.framerate = buf.get_f32_le();
32469        __struct.bitrate = buf.get_u32_le();
32470        let tmp = buf.get_u16_le();
32471        __struct.flags = VideoStreamStatusFlags::from_bits(
32472            tmp & VideoStreamStatusFlags::all().bits(),
32473        )
32474        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
32475            flag_type: "VideoStreamStatusFlags",
32476            value: tmp as u32,
32477        })?;
32478        __struct.resolution_h = buf.get_u16_le();
32479        __struct.resolution_v = buf.get_u16_le();
32480        __struct.rotation = buf.get_u16_le();
32481        __struct.hfov = buf.get_u16_le();
32482        __struct.stream_id = buf.get_u8();
32483        __struct.count = buf.get_u8();
32484        let tmp = buf.get_u8();
32485        __struct.mavtype =
32486            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
32487                enum_type: "VideoStreamType",
32488                value: tmp as u32,
32489            })?;
32490        for v in &mut __struct.name {
32491            let val = buf.get_u8();
32492            *v = val;
32493        }
32494        for v in &mut __struct.uri {
32495            let val = buf.get_u8();
32496            *v = val;
32497        }
32498        let tmp = buf.get_u8();
32499        __struct.encoding =
32500            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
32501                enum_type: "VideoStreamEncoding",
32502                value: tmp as u32,
32503            })?;
32504        __struct.camera_device_id = buf.get_u8();
32505        Ok(__struct)
32506    }
32507    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32508        let mut __tmp = BytesMut::new(bytes);
32509        #[allow(clippy::absurd_extreme_comparisons)]
32510        #[allow(unused_comparisons)]
32511        if __tmp.remaining() < Self::ENCODED_LEN {
32512            panic!(
32513                "buffer is too small (need {} bytes, but got {})",
32514                Self::ENCODED_LEN,
32515                __tmp.remaining(),
32516            )
32517        }
32518        __tmp.put_f32_le(self.framerate);
32519        __tmp.put_u32_le(self.bitrate);
32520        __tmp.put_u16_le(self.flags.bits());
32521        __tmp.put_u16_le(self.resolution_h);
32522        __tmp.put_u16_le(self.resolution_v);
32523        __tmp.put_u16_le(self.rotation);
32524        __tmp.put_u16_le(self.hfov);
32525        __tmp.put_u8(self.stream_id);
32526        __tmp.put_u8(self.count);
32527        __tmp.put_u8(self.mavtype as u8);
32528        for val in &self.name {
32529            __tmp.put_u8(*val);
32530        }
32531        for val in &self.uri {
32532            __tmp.put_u8(*val);
32533        }
32534        if matches!(version, MavlinkVersion::V2) {
32535            __tmp.put_u8(self.encoding as u8);
32536            __tmp.put_u8(self.camera_device_id);
32537            let len = __tmp.len();
32538            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32539        } else {
32540            __tmp.len()
32541        }
32542    }
32543}
32544#[doc = "Information about the status of a video stream. It may be requested using MAV_CMD_REQUEST_MESSAGE."]
32545#[doc = ""]
32546#[doc = "ID: 270"]
32547#[derive(Debug, Clone, PartialEq)]
32548#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32549#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32550pub struct VIDEO_STREAM_STATUS_DATA {
32551    #[doc = "Frame rate"]
32552    pub framerate: f32,
32553    #[doc = "Bit rate"]
32554    pub bitrate: u32,
32555    #[doc = "Bitmap of stream status flags"]
32556    pub flags: VideoStreamStatusFlags,
32557    #[doc = "Horizontal resolution"]
32558    pub resolution_h: u16,
32559    #[doc = "Vertical resolution"]
32560    pub resolution_v: u16,
32561    #[doc = "Video image rotation clockwise"]
32562    pub rotation: u16,
32563    #[doc = "Horizontal Field of view"]
32564    pub hfov: u16,
32565    #[doc = "Video Stream ID (1 for first, 2 for second, etc.)"]
32566    pub stream_id: u8,
32567    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
32568    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
32569    pub camera_device_id: u8,
32570}
32571impl VIDEO_STREAM_STATUS_DATA {
32572    pub const ENCODED_LEN: usize = 20usize;
32573    pub const DEFAULT: Self = Self {
32574        framerate: 0.0_f32,
32575        bitrate: 0_u32,
32576        flags: VideoStreamStatusFlags::DEFAULT,
32577        resolution_h: 0_u16,
32578        resolution_v: 0_u16,
32579        rotation: 0_u16,
32580        hfov: 0_u16,
32581        stream_id: 0_u8,
32582        camera_device_id: 0_u8,
32583    };
32584    #[cfg(feature = "arbitrary")]
32585    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32586        use arbitrary::{Arbitrary, Unstructured};
32587        let mut buf = [0u8; 1024];
32588        rng.fill_bytes(&mut buf);
32589        let mut unstructured = Unstructured::new(&buf);
32590        Self::arbitrary(&mut unstructured).unwrap_or_default()
32591    }
32592}
32593impl Default for VIDEO_STREAM_STATUS_DATA {
32594    fn default() -> Self {
32595        Self::DEFAULT.clone()
32596    }
32597}
32598impl MessageData for VIDEO_STREAM_STATUS_DATA {
32599    type Message = MavMessage;
32600    const ID: u32 = 270u32;
32601    const NAME: &'static str = "VIDEO_STREAM_STATUS";
32602    const EXTRA_CRC: u8 = 59u8;
32603    const ENCODED_LEN: usize = 20usize;
32604    fn deser(
32605        _version: MavlinkVersion,
32606        __input: &[u8],
32607    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32608        let avail_len = __input.len();
32609        let mut payload_buf = [0; Self::ENCODED_LEN];
32610        let mut buf = if avail_len < Self::ENCODED_LEN {
32611            payload_buf[0..avail_len].copy_from_slice(__input);
32612            Bytes::new(&payload_buf)
32613        } else {
32614            Bytes::new(__input)
32615        };
32616        let mut __struct = Self::default();
32617        __struct.framerate = buf.get_f32_le();
32618        __struct.bitrate = buf.get_u32_le();
32619        let tmp = buf.get_u16_le();
32620        __struct.flags = VideoStreamStatusFlags::from_bits(
32621            tmp & VideoStreamStatusFlags::all().bits(),
32622        )
32623        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
32624            flag_type: "VideoStreamStatusFlags",
32625            value: tmp as u32,
32626        })?;
32627        __struct.resolution_h = buf.get_u16_le();
32628        __struct.resolution_v = buf.get_u16_le();
32629        __struct.rotation = buf.get_u16_le();
32630        __struct.hfov = buf.get_u16_le();
32631        __struct.stream_id = buf.get_u8();
32632        __struct.camera_device_id = buf.get_u8();
32633        Ok(__struct)
32634    }
32635    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32636        let mut __tmp = BytesMut::new(bytes);
32637        #[allow(clippy::absurd_extreme_comparisons)]
32638        #[allow(unused_comparisons)]
32639        if __tmp.remaining() < Self::ENCODED_LEN {
32640            panic!(
32641                "buffer is too small (need {} bytes, but got {})",
32642                Self::ENCODED_LEN,
32643                __tmp.remaining(),
32644            )
32645        }
32646        __tmp.put_f32_le(self.framerate);
32647        __tmp.put_u32_le(self.bitrate);
32648        __tmp.put_u16_le(self.flags.bits());
32649        __tmp.put_u16_le(self.resolution_h);
32650        __tmp.put_u16_le(self.resolution_v);
32651        __tmp.put_u16_le(self.rotation);
32652        __tmp.put_u16_le(self.hfov);
32653        __tmp.put_u8(self.stream_id);
32654        if matches!(version, MavlinkVersion::V2) {
32655            __tmp.put_u8(self.camera_device_id);
32656            let len = __tmp.len();
32657            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32658        } else {
32659            __tmp.len()
32660        }
32661    }
32662}
32663#[doc = "Local position/attitude estimate from a vision source."]
32664#[doc = ""]
32665#[doc = "ID: 102"]
32666#[derive(Debug, Clone, PartialEq)]
32667#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32668#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32669pub struct VISION_POSITION_ESTIMATE_DATA {
32670    #[doc = "Timestamp (UNIX time or time since system boot)"]
32671    pub usec: u64,
32672    #[doc = "Local X position"]
32673    pub x: f32,
32674    #[doc = "Local Y position"]
32675    pub y: f32,
32676    #[doc = "Local Z position"]
32677    pub z: f32,
32678    #[doc = "Roll angle"]
32679    pub roll: f32,
32680    #[doc = "Pitch angle"]
32681    pub pitch: f32,
32682    #[doc = "Yaw angle"]
32683    pub yaw: f32,
32684    #[doc = "Row-major representation of pose 6x6 cross-covariance matrix upper right triangle (states: x, y, z, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
32685    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
32686    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32687    pub covariance: [f32; 21],
32688    #[doc = "Estimate reset counter. This should be incremented when the estimate resets in any of the dimensions (position, velocity, attitude, angular speed). This is designed to be used when e.g an external SLAM system detects a loop-closure and the estimate jumps."]
32689    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
32690    pub reset_counter: u8,
32691}
32692impl VISION_POSITION_ESTIMATE_DATA {
32693    pub const ENCODED_LEN: usize = 117usize;
32694    pub const DEFAULT: Self = Self {
32695        usec: 0_u64,
32696        x: 0.0_f32,
32697        y: 0.0_f32,
32698        z: 0.0_f32,
32699        roll: 0.0_f32,
32700        pitch: 0.0_f32,
32701        yaw: 0.0_f32,
32702        covariance: [0.0_f32; 21usize],
32703        reset_counter: 0_u8,
32704    };
32705    #[cfg(feature = "arbitrary")]
32706    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32707        use arbitrary::{Arbitrary, Unstructured};
32708        let mut buf = [0u8; 1024];
32709        rng.fill_bytes(&mut buf);
32710        let mut unstructured = Unstructured::new(&buf);
32711        Self::arbitrary(&mut unstructured).unwrap_or_default()
32712    }
32713}
32714impl Default for VISION_POSITION_ESTIMATE_DATA {
32715    fn default() -> Self {
32716        Self::DEFAULT.clone()
32717    }
32718}
32719impl MessageData for VISION_POSITION_ESTIMATE_DATA {
32720    type Message = MavMessage;
32721    const ID: u32 = 102u32;
32722    const NAME: &'static str = "VISION_POSITION_ESTIMATE";
32723    const EXTRA_CRC: u8 = 158u8;
32724    const ENCODED_LEN: usize = 117usize;
32725    fn deser(
32726        _version: MavlinkVersion,
32727        __input: &[u8],
32728    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32729        let avail_len = __input.len();
32730        let mut payload_buf = [0; Self::ENCODED_LEN];
32731        let mut buf = if avail_len < Self::ENCODED_LEN {
32732            payload_buf[0..avail_len].copy_from_slice(__input);
32733            Bytes::new(&payload_buf)
32734        } else {
32735            Bytes::new(__input)
32736        };
32737        let mut __struct = Self::default();
32738        __struct.usec = buf.get_u64_le();
32739        __struct.x = buf.get_f32_le();
32740        __struct.y = buf.get_f32_le();
32741        __struct.z = buf.get_f32_le();
32742        __struct.roll = buf.get_f32_le();
32743        __struct.pitch = buf.get_f32_le();
32744        __struct.yaw = buf.get_f32_le();
32745        for v in &mut __struct.covariance {
32746            let val = buf.get_f32_le();
32747            *v = val;
32748        }
32749        __struct.reset_counter = buf.get_u8();
32750        Ok(__struct)
32751    }
32752    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32753        let mut __tmp = BytesMut::new(bytes);
32754        #[allow(clippy::absurd_extreme_comparisons)]
32755        #[allow(unused_comparisons)]
32756        if __tmp.remaining() < Self::ENCODED_LEN {
32757            panic!(
32758                "buffer is too small (need {} bytes, but got {})",
32759                Self::ENCODED_LEN,
32760                __tmp.remaining(),
32761            )
32762        }
32763        __tmp.put_u64_le(self.usec);
32764        __tmp.put_f32_le(self.x);
32765        __tmp.put_f32_le(self.y);
32766        __tmp.put_f32_le(self.z);
32767        __tmp.put_f32_le(self.roll);
32768        __tmp.put_f32_le(self.pitch);
32769        __tmp.put_f32_le(self.yaw);
32770        if matches!(version, MavlinkVersion::V2) {
32771            for val in &self.covariance {
32772                __tmp.put_f32_le(*val);
32773            }
32774            __tmp.put_u8(self.reset_counter);
32775            let len = __tmp.len();
32776            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32777        } else {
32778            __tmp.len()
32779        }
32780    }
32781}
32782#[doc = "Speed estimate from a vision source."]
32783#[doc = ""]
32784#[doc = "ID: 103"]
32785#[derive(Debug, Clone, PartialEq)]
32786#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32787#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32788pub struct VISION_SPEED_ESTIMATE_DATA {
32789    #[doc = "Timestamp (UNIX time or time since system boot)"]
32790    pub usec: u64,
32791    #[doc = "Global X speed"]
32792    pub x: f32,
32793    #[doc = "Global Y speed"]
32794    pub y: f32,
32795    #[doc = "Global Z speed"]
32796    pub z: f32,
32797    #[doc = "Row-major representation of 3x3 linear velocity covariance matrix (states: vx, vy, vz; 1st three entries - 1st row, etc.). If unknown, assign NaN value to first element in the array."]
32798    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
32799    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32800    pub covariance: [f32; 9],
32801    #[doc = "Estimate reset counter. This should be incremented when the estimate resets in any of the dimensions (position, velocity, attitude, angular speed). This is designed to be used when e.g an external SLAM system detects a loop-closure and the estimate jumps."]
32802    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
32803    pub reset_counter: u8,
32804}
32805impl VISION_SPEED_ESTIMATE_DATA {
32806    pub const ENCODED_LEN: usize = 57usize;
32807    pub const DEFAULT: Self = Self {
32808        usec: 0_u64,
32809        x: 0.0_f32,
32810        y: 0.0_f32,
32811        z: 0.0_f32,
32812        covariance: [0.0_f32; 9usize],
32813        reset_counter: 0_u8,
32814    };
32815    #[cfg(feature = "arbitrary")]
32816    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32817        use arbitrary::{Arbitrary, Unstructured};
32818        let mut buf = [0u8; 1024];
32819        rng.fill_bytes(&mut buf);
32820        let mut unstructured = Unstructured::new(&buf);
32821        Self::arbitrary(&mut unstructured).unwrap_or_default()
32822    }
32823}
32824impl Default for VISION_SPEED_ESTIMATE_DATA {
32825    fn default() -> Self {
32826        Self::DEFAULT.clone()
32827    }
32828}
32829impl MessageData for VISION_SPEED_ESTIMATE_DATA {
32830    type Message = MavMessage;
32831    const ID: u32 = 103u32;
32832    const NAME: &'static str = "VISION_SPEED_ESTIMATE";
32833    const EXTRA_CRC: u8 = 208u8;
32834    const ENCODED_LEN: usize = 57usize;
32835    fn deser(
32836        _version: MavlinkVersion,
32837        __input: &[u8],
32838    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32839        let avail_len = __input.len();
32840        let mut payload_buf = [0; Self::ENCODED_LEN];
32841        let mut buf = if avail_len < Self::ENCODED_LEN {
32842            payload_buf[0..avail_len].copy_from_slice(__input);
32843            Bytes::new(&payload_buf)
32844        } else {
32845            Bytes::new(__input)
32846        };
32847        let mut __struct = Self::default();
32848        __struct.usec = buf.get_u64_le();
32849        __struct.x = buf.get_f32_le();
32850        __struct.y = buf.get_f32_le();
32851        __struct.z = buf.get_f32_le();
32852        for v in &mut __struct.covariance {
32853            let val = buf.get_f32_le();
32854            *v = val;
32855        }
32856        __struct.reset_counter = buf.get_u8();
32857        Ok(__struct)
32858    }
32859    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32860        let mut __tmp = BytesMut::new(bytes);
32861        #[allow(clippy::absurd_extreme_comparisons)]
32862        #[allow(unused_comparisons)]
32863        if __tmp.remaining() < Self::ENCODED_LEN {
32864            panic!(
32865                "buffer is too small (need {} bytes, but got {})",
32866                Self::ENCODED_LEN,
32867                __tmp.remaining(),
32868            )
32869        }
32870        __tmp.put_u64_le(self.usec);
32871        __tmp.put_f32_le(self.x);
32872        __tmp.put_f32_le(self.y);
32873        __tmp.put_f32_le(self.z);
32874        if matches!(version, MavlinkVersion::V2) {
32875            for val in &self.covariance {
32876                __tmp.put_f32_le(*val);
32877            }
32878            __tmp.put_u8(self.reset_counter);
32879            let len = __tmp.len();
32880            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32881        } else {
32882            __tmp.len()
32883        }
32884    }
32885}
32886#[doc = "Cumulative distance traveled for each reported wheel."]
32887#[doc = ""]
32888#[doc = "ID: 9000"]
32889#[derive(Debug, Clone, PartialEq)]
32890#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32891#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32892pub struct WHEEL_DISTANCE_DATA {
32893    #[doc = "Timestamp (synced to UNIX time or since system boot)."]
32894    pub time_usec: u64,
32895    #[doc = "Distance reported by individual wheel encoders. Forward rotations increase values, reverse rotations decrease them. Not all wheels will necessarily have wheel encoders; the mapping of encoders to wheel positions must be agreed/understood by the endpoints."]
32896    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32897    pub distance: [f64; 16],
32898    #[doc = "Number of wheels reported."]
32899    pub count: u8,
32900}
32901impl WHEEL_DISTANCE_DATA {
32902    pub const ENCODED_LEN: usize = 137usize;
32903    pub const DEFAULT: Self = Self {
32904        time_usec: 0_u64,
32905        distance: [0.0_f64; 16usize],
32906        count: 0_u8,
32907    };
32908    #[cfg(feature = "arbitrary")]
32909    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32910        use arbitrary::{Arbitrary, Unstructured};
32911        let mut buf = [0u8; 1024];
32912        rng.fill_bytes(&mut buf);
32913        let mut unstructured = Unstructured::new(&buf);
32914        Self::arbitrary(&mut unstructured).unwrap_or_default()
32915    }
32916}
32917impl Default for WHEEL_DISTANCE_DATA {
32918    fn default() -> Self {
32919        Self::DEFAULT.clone()
32920    }
32921}
32922impl MessageData for WHEEL_DISTANCE_DATA {
32923    type Message = MavMessage;
32924    const ID: u32 = 9000u32;
32925    const NAME: &'static str = "WHEEL_DISTANCE";
32926    const EXTRA_CRC: u8 = 113u8;
32927    const ENCODED_LEN: usize = 137usize;
32928    fn deser(
32929        _version: MavlinkVersion,
32930        __input: &[u8],
32931    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32932        let avail_len = __input.len();
32933        let mut payload_buf = [0; Self::ENCODED_LEN];
32934        let mut buf = if avail_len < Self::ENCODED_LEN {
32935            payload_buf[0..avail_len].copy_from_slice(__input);
32936            Bytes::new(&payload_buf)
32937        } else {
32938            Bytes::new(__input)
32939        };
32940        let mut __struct = Self::default();
32941        __struct.time_usec = buf.get_u64_le();
32942        for v in &mut __struct.distance {
32943            let val = buf.get_f64_le();
32944            *v = val;
32945        }
32946        __struct.count = buf.get_u8();
32947        Ok(__struct)
32948    }
32949    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32950        let mut __tmp = BytesMut::new(bytes);
32951        #[allow(clippy::absurd_extreme_comparisons)]
32952        #[allow(unused_comparisons)]
32953        if __tmp.remaining() < Self::ENCODED_LEN {
32954            panic!(
32955                "buffer is too small (need {} bytes, but got {})",
32956                Self::ENCODED_LEN,
32957                __tmp.remaining(),
32958            )
32959        }
32960        __tmp.put_u64_le(self.time_usec);
32961        for val in &self.distance {
32962            __tmp.put_f64_le(*val);
32963        }
32964        __tmp.put_u8(self.count);
32965        if matches!(version, MavlinkVersion::V2) {
32966            let len = __tmp.len();
32967            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32968        } else {
32969            __tmp.len()
32970        }
32971    }
32972}
32973#[doc = "Configure WiFi AP SSID, password, and mode. This message is re-emitted as an acknowledgement by the AP. The message may also be explicitly requested using MAV_CMD_REQUEST_MESSAGE."]
32974#[doc = ""]
32975#[doc = "ID: 299"]
32976#[derive(Debug, Clone, PartialEq)]
32977#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32978#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32979pub struct WIFI_CONFIG_AP_DATA {
32980    #[doc = "Name of Wi-Fi network (SSID). Blank to leave it unchanged when setting. Current SSID when sent back as a response."]
32981    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32982    pub ssid: [u8; 32],
32983    #[doc = "Password. Blank for an open AP. MD5 hash when message is sent back as a response."]
32984    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32985    pub password: [u8; 64],
32986    #[doc = "WiFi Mode."]
32987    #[cfg_attr(feature = "serde", serde(default))]
32988    pub mode: WifiConfigApMode,
32989    #[doc = "Message acceptance response (sent back to GS)."]
32990    #[cfg_attr(feature = "serde", serde(default))]
32991    pub response: WifiConfigApResponse,
32992}
32993impl WIFI_CONFIG_AP_DATA {
32994    pub const ENCODED_LEN: usize = 98usize;
32995    pub const DEFAULT: Self = Self {
32996        ssid: [0_u8; 32usize],
32997        password: [0_u8; 64usize],
32998        mode: WifiConfigApMode::DEFAULT,
32999        response: WifiConfigApResponse::DEFAULT,
33000    };
33001    #[cfg(feature = "arbitrary")]
33002    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
33003        use arbitrary::{Arbitrary, Unstructured};
33004        let mut buf = [0u8; 1024];
33005        rng.fill_bytes(&mut buf);
33006        let mut unstructured = Unstructured::new(&buf);
33007        Self::arbitrary(&mut unstructured).unwrap_or_default()
33008    }
33009}
33010impl Default for WIFI_CONFIG_AP_DATA {
33011    fn default() -> Self {
33012        Self::DEFAULT.clone()
33013    }
33014}
33015impl MessageData for WIFI_CONFIG_AP_DATA {
33016    type Message = MavMessage;
33017    const ID: u32 = 299u32;
33018    const NAME: &'static str = "WIFI_CONFIG_AP";
33019    const EXTRA_CRC: u8 = 19u8;
33020    const ENCODED_LEN: usize = 98usize;
33021    fn deser(
33022        _version: MavlinkVersion,
33023        __input: &[u8],
33024    ) -> Result<Self, ::mavlink_core::error::ParserError> {
33025        let avail_len = __input.len();
33026        let mut payload_buf = [0; Self::ENCODED_LEN];
33027        let mut buf = if avail_len < Self::ENCODED_LEN {
33028            payload_buf[0..avail_len].copy_from_slice(__input);
33029            Bytes::new(&payload_buf)
33030        } else {
33031            Bytes::new(__input)
33032        };
33033        let mut __struct = Self::default();
33034        for v in &mut __struct.ssid {
33035            let val = buf.get_u8();
33036            *v = val;
33037        }
33038        for v in &mut __struct.password {
33039            let val = buf.get_u8();
33040            *v = val;
33041        }
33042        let tmp = buf.get_i8();
33043        __struct.mode =
33044            FromPrimitive::from_i8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
33045                enum_type: "WifiConfigApMode",
33046                value: tmp as u32,
33047            })?;
33048        let tmp = buf.get_i8();
33049        __struct.response =
33050            FromPrimitive::from_i8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
33051                enum_type: "WifiConfigApResponse",
33052                value: tmp as u32,
33053            })?;
33054        Ok(__struct)
33055    }
33056    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
33057        let mut __tmp = BytesMut::new(bytes);
33058        #[allow(clippy::absurd_extreme_comparisons)]
33059        #[allow(unused_comparisons)]
33060        if __tmp.remaining() < Self::ENCODED_LEN {
33061            panic!(
33062                "buffer is too small (need {} bytes, but got {})",
33063                Self::ENCODED_LEN,
33064                __tmp.remaining(),
33065            )
33066        }
33067        for val in &self.ssid {
33068            __tmp.put_u8(*val);
33069        }
33070        for val in &self.password {
33071            __tmp.put_u8(*val);
33072        }
33073        if matches!(version, MavlinkVersion::V2) {
33074            __tmp.put_i8(self.mode as i8);
33075            __tmp.put_i8(self.response as i8);
33076            let len = __tmp.len();
33077            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
33078        } else {
33079            __tmp.len()
33080        }
33081    }
33082}
33083#[doc = "Winch status."]
33084#[doc = ""]
33085#[doc = "ID: 9005"]
33086#[derive(Debug, Clone, PartialEq)]
33087#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
33088#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
33089pub struct WINCH_STATUS_DATA {
33090    #[doc = "Timestamp (synced to UNIX time or since system boot)."]
33091    pub time_usec: u64,
33092    #[doc = "Length of line released. NaN if unknown"]
33093    pub line_length: f32,
33094    #[doc = "Speed line is being released or retracted. Positive values if being released, negative values if being retracted, NaN if unknown"]
33095    pub speed: f32,
33096    #[doc = "Tension on the line. NaN if unknown"]
33097    pub tension: f32,
33098    #[doc = "Voltage of the battery supplying the winch. NaN if unknown"]
33099    pub voltage: f32,
33100    #[doc = "Current draw from the winch. NaN if unknown"]
33101    pub current: f32,
33102    #[doc = "Status flags"]
33103    pub status: MavWinchStatusFlag,
33104    #[doc = "Temperature of the motor. INT16_MAX if unknown"]
33105    pub temperature: i16,
33106}
33107impl WINCH_STATUS_DATA {
33108    pub const ENCODED_LEN: usize = 34usize;
33109    pub const DEFAULT: Self = Self {
33110        time_usec: 0_u64,
33111        line_length: 0.0_f32,
33112        speed: 0.0_f32,
33113        tension: 0.0_f32,
33114        voltage: 0.0_f32,
33115        current: 0.0_f32,
33116        status: MavWinchStatusFlag::DEFAULT,
33117        temperature: 0_i16,
33118    };
33119    #[cfg(feature = "arbitrary")]
33120    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
33121        use arbitrary::{Arbitrary, Unstructured};
33122        let mut buf = [0u8; 1024];
33123        rng.fill_bytes(&mut buf);
33124        let mut unstructured = Unstructured::new(&buf);
33125        Self::arbitrary(&mut unstructured).unwrap_or_default()
33126    }
33127}
33128impl Default for WINCH_STATUS_DATA {
33129    fn default() -> Self {
33130        Self::DEFAULT.clone()
33131    }
33132}
33133impl MessageData for WINCH_STATUS_DATA {
33134    type Message = MavMessage;
33135    const ID: u32 = 9005u32;
33136    const NAME: &'static str = "WINCH_STATUS";
33137    const EXTRA_CRC: u8 = 117u8;
33138    const ENCODED_LEN: usize = 34usize;
33139    fn deser(
33140        _version: MavlinkVersion,
33141        __input: &[u8],
33142    ) -> Result<Self, ::mavlink_core::error::ParserError> {
33143        let avail_len = __input.len();
33144        let mut payload_buf = [0; Self::ENCODED_LEN];
33145        let mut buf = if avail_len < Self::ENCODED_LEN {
33146            payload_buf[0..avail_len].copy_from_slice(__input);
33147            Bytes::new(&payload_buf)
33148        } else {
33149            Bytes::new(__input)
33150        };
33151        let mut __struct = Self::default();
33152        __struct.time_usec = buf.get_u64_le();
33153        __struct.line_length = buf.get_f32_le();
33154        __struct.speed = buf.get_f32_le();
33155        __struct.tension = buf.get_f32_le();
33156        __struct.voltage = buf.get_f32_le();
33157        __struct.current = buf.get_f32_le();
33158        let tmp = buf.get_u32_le();
33159        __struct.status = MavWinchStatusFlag::from_bits(tmp & MavWinchStatusFlag::all().bits())
33160            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
33161                flag_type: "MavWinchStatusFlag",
33162                value: tmp as u32,
33163            })?;
33164        __struct.temperature = buf.get_i16_le();
33165        Ok(__struct)
33166    }
33167    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
33168        let mut __tmp = BytesMut::new(bytes);
33169        #[allow(clippy::absurd_extreme_comparisons)]
33170        #[allow(unused_comparisons)]
33171        if __tmp.remaining() < Self::ENCODED_LEN {
33172            panic!(
33173                "buffer is too small (need {} bytes, but got {})",
33174                Self::ENCODED_LEN,
33175                __tmp.remaining(),
33176            )
33177        }
33178        __tmp.put_u64_le(self.time_usec);
33179        __tmp.put_f32_le(self.line_length);
33180        __tmp.put_f32_le(self.speed);
33181        __tmp.put_f32_le(self.tension);
33182        __tmp.put_f32_le(self.voltage);
33183        __tmp.put_f32_le(self.current);
33184        __tmp.put_u32_le(self.status.bits());
33185        __tmp.put_i16_le(self.temperature);
33186        if matches!(version, MavlinkVersion::V2) {
33187            let len = __tmp.len();
33188            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
33189        } else {
33190            __tmp.len()
33191        }
33192    }
33193}
33194#[doc = "Wind estimate from vehicle. Note that despite the name, this message does not actually contain any covariances but instead variability and accuracy fields in terms of standard deviation (1-STD)."]
33195#[doc = ""]
33196#[doc = "ID: 231"]
33197#[derive(Debug, Clone, PartialEq)]
33198#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
33199#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
33200pub struct WIND_COV_DATA {
33201    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
33202    pub time_usec: u64,
33203    #[doc = "Wind in North (NED) direction (NAN if unknown)"]
33204    pub wind_x: f32,
33205    #[doc = "Wind in East (NED) direction (NAN if unknown)"]
33206    pub wind_y: f32,
33207    #[doc = "Wind in down (NED) direction (NAN if unknown)"]
33208    pub wind_z: f32,
33209    #[doc = "Variability of wind in XY, 1-STD estimated from a 1 Hz lowpassed wind estimate (NAN if unknown)"]
33210    pub var_horiz: f32,
33211    #[doc = "Variability of wind in Z, 1-STD estimated from a 1 Hz lowpassed wind estimate (NAN if unknown)"]
33212    pub var_vert: f32,
33213    #[doc = "Altitude (MSL) that this measurement was taken at (NAN if unknown)"]
33214    pub wind_alt: f32,
33215    #[doc = "Horizontal speed 1-STD accuracy (0 if unknown)"]
33216    pub horiz_accuracy: f32,
33217    #[doc = "Vertical speed 1-STD accuracy (0 if unknown)"]
33218    pub vert_accuracy: f32,
33219}
33220impl WIND_COV_DATA {
33221    pub const ENCODED_LEN: usize = 40usize;
33222    pub const DEFAULT: Self = Self {
33223        time_usec: 0_u64,
33224        wind_x: 0.0_f32,
33225        wind_y: 0.0_f32,
33226        wind_z: 0.0_f32,
33227        var_horiz: 0.0_f32,
33228        var_vert: 0.0_f32,
33229        wind_alt: 0.0_f32,
33230        horiz_accuracy: 0.0_f32,
33231        vert_accuracy: 0.0_f32,
33232    };
33233    #[cfg(feature = "arbitrary")]
33234    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
33235        use arbitrary::{Arbitrary, Unstructured};
33236        let mut buf = [0u8; 1024];
33237        rng.fill_bytes(&mut buf);
33238        let mut unstructured = Unstructured::new(&buf);
33239        Self::arbitrary(&mut unstructured).unwrap_or_default()
33240    }
33241}
33242impl Default for WIND_COV_DATA {
33243    fn default() -> Self {
33244        Self::DEFAULT.clone()
33245    }
33246}
33247impl MessageData for WIND_COV_DATA {
33248    type Message = MavMessage;
33249    const ID: u32 = 231u32;
33250    const NAME: &'static str = "WIND_COV";
33251    const EXTRA_CRC: u8 = 105u8;
33252    const ENCODED_LEN: usize = 40usize;
33253    fn deser(
33254        _version: MavlinkVersion,
33255        __input: &[u8],
33256    ) -> Result<Self, ::mavlink_core::error::ParserError> {
33257        let avail_len = __input.len();
33258        let mut payload_buf = [0; Self::ENCODED_LEN];
33259        let mut buf = if avail_len < Self::ENCODED_LEN {
33260            payload_buf[0..avail_len].copy_from_slice(__input);
33261            Bytes::new(&payload_buf)
33262        } else {
33263            Bytes::new(__input)
33264        };
33265        let mut __struct = Self::default();
33266        __struct.time_usec = buf.get_u64_le();
33267        __struct.wind_x = buf.get_f32_le();
33268        __struct.wind_y = buf.get_f32_le();
33269        __struct.wind_z = buf.get_f32_le();
33270        __struct.var_horiz = buf.get_f32_le();
33271        __struct.var_vert = buf.get_f32_le();
33272        __struct.wind_alt = buf.get_f32_le();
33273        __struct.horiz_accuracy = buf.get_f32_le();
33274        __struct.vert_accuracy = buf.get_f32_le();
33275        Ok(__struct)
33276    }
33277    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
33278        let mut __tmp = BytesMut::new(bytes);
33279        #[allow(clippy::absurd_extreme_comparisons)]
33280        #[allow(unused_comparisons)]
33281        if __tmp.remaining() < Self::ENCODED_LEN {
33282            panic!(
33283                "buffer is too small (need {} bytes, but got {})",
33284                Self::ENCODED_LEN,
33285                __tmp.remaining(),
33286            )
33287        }
33288        __tmp.put_u64_le(self.time_usec);
33289        __tmp.put_f32_le(self.wind_x);
33290        __tmp.put_f32_le(self.wind_y);
33291        __tmp.put_f32_le(self.wind_z);
33292        __tmp.put_f32_le(self.var_horiz);
33293        __tmp.put_f32_le(self.var_vert);
33294        __tmp.put_f32_le(self.wind_alt);
33295        __tmp.put_f32_le(self.horiz_accuracy);
33296        __tmp.put_f32_le(self.vert_accuracy);
33297        if matches!(version, MavlinkVersion::V2) {
33298            let len = __tmp.len();
33299            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
33300        } else {
33301            __tmp.len()
33302        }
33303    }
33304}
33305#[derive(Clone, PartialEq, Debug)]
33306#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
33307#[cfg_attr(feature = "serde", serde(tag = "type"))]
33308#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
33309#[repr(u32)]
33310pub enum MavMessage {
33311    #[doc = "Set the vehicle attitude and body angular rates."]
33312    #[doc = ""]
33313    #[doc = "ID: 140"]
33314    ACTUATOR_CONTROL_TARGET(ACTUATOR_CONTROL_TARGET_DATA),
33315    #[doc = "The raw values of the actuator outputs (e.g. on Pixhawk, from MAIN, AUX ports). This message supersedes SERVO_OUTPUT_RAW."]
33316    #[doc = ""]
33317    #[doc = "ID: 375"]
33318    ACTUATOR_OUTPUT_STATUS(ACTUATOR_OUTPUT_STATUS_DATA),
33319    #[doc = "The location and information of an ADSB vehicle."]
33320    #[doc = ""]
33321    #[doc = "ID: 246"]
33322    ADSB_VEHICLE(ADSB_VEHICLE_DATA),
33323    #[doc = "The location and information of an AIS vessel."]
33324    #[doc = ""]
33325    #[doc = "ID: 301"]
33326    AIS_VESSEL(AIS_VESSEL_DATA),
33327    #[doc = "The current system altitude."]
33328    #[doc = ""]
33329    #[doc = "ID: 141"]
33330    ALTITUDE(ALTITUDE_DATA),
33331    #[doc = "ASL-fixed-wing controller data."]
33332    #[doc = ""]
33333    #[doc = "ID: 8004"]
33334    ASLCTRL_DATA(ASLCTRL_DATA_DATA),
33335    #[doc = "ASL-fixed-wing controller debug data."]
33336    #[doc = ""]
33337    #[doc = "ID: 8005"]
33338    ASLCTRL_DEBUG(ASLCTRL_DEBUG_DATA),
33339    #[doc = "Extended state information for ASLUAVs."]
33340    #[doc = ""]
33341    #[doc = "ID: 8006"]
33342    ASLUAV_STATUS(ASLUAV_STATUS_DATA),
33343    #[doc = "Off-board controls/commands for ASLUAVs."]
33344    #[doc = ""]
33345    #[doc = "ID: 8008"]
33346    ASL_OBCTRL(ASL_OBCTRL_DATA),
33347    #[doc = "The attitude in the aeronautical frame (right-handed, Z-down, Y-right, X-front, ZYX, intrinsic)."]
33348    #[doc = ""]
33349    #[doc = "ID: 30"]
33350    ATTITUDE(ATTITUDE_DATA),
33351    #[doc = "The attitude in the aeronautical frame (right-handed, Z-down, X-front, Y-right), expressed as quaternion. Quaternion order is w, x, y, z and a zero rotation would be expressed as (1 0 0 0)."]
33352    #[doc = ""]
33353    #[doc = "ID: 31"]
33354    ATTITUDE_QUATERNION(ATTITUDE_QUATERNION_DATA),
33355    #[doc = "The attitude in the aeronautical frame (right-handed, Z-down, X-front, Y-right), expressed as quaternion. Quaternion order is w, x, y, z and a zero rotation would be expressed as (1 0 0 0)."]
33356    #[doc = ""]
33357    #[doc = "ID: 61"]
33358    ATTITUDE_QUATERNION_COV(ATTITUDE_QUATERNION_COV_DATA),
33359    #[doc = "Reports the current commanded attitude of the vehicle as specified by the autopilot. This should match the commands sent in a SET_ATTITUDE_TARGET message if the vehicle is being controlled this way."]
33360    #[doc = ""]
33361    #[doc = "ID: 83"]
33362    ATTITUDE_TARGET(ATTITUDE_TARGET_DATA),
33363    #[doc = "Motion capture attitude and position."]
33364    #[doc = ""]
33365    #[doc = "ID: 138"]
33366    ATT_POS_MOCAP(ATT_POS_MOCAP_DATA),
33367    #[doc = "Emit an encrypted signature / key identifying this system. PLEASE NOTE: This protocol has been kept simple, so transmitting the key requires an encrypted channel for true safety."]
33368    #[doc = ""]
33369    #[doc = "ID: 7"]
33370    AUTH_KEY(AUTH_KEY_DATA),
33371    #[doc = "Low level message containing autopilot state relevant for a gimbal device. This message is to be sent from the autopilot to the gimbal device component. The data of this message are for the gimbal device's estimator corrections, in particular horizon compensation, as well as indicates autopilot control intentions, e.g. feed forward angular control in the z-axis."]
33372    #[doc = ""]
33373    #[doc = "ID: 286"]
33374    AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA),
33375    #[doc = "Version and capability of autopilot software. This should be emitted in response to a request with MAV_CMD_REQUEST_MESSAGE."]
33376    #[doc = ""]
33377    #[doc = "ID: 148"]
33378    AUTOPILOT_VERSION(AUTOPILOT_VERSION_DATA),
33379    #[doc = "Information about a flight mode.          The message can be enumerated to get information for all modes, or requested for a particular mode, using MAV_CMD_REQUEST_MESSAGE.         Specify 0 in param2 to request that the message is emitted for all available modes or the specific index for just one mode.         The modes must be available/settable for the current vehicle/frame type.         Each mode should only be emitted once (even if it is both standard and custom).         Note that the current mode should be emitted in CURRENT_MODE, and that if the mode list can change then AVAILABLE_MODES_MONITOR must be emitted on first change and subsequently streamed.         See <https://mavlink.io/en/services/standard_modes.html>."]
33380    #[doc = ""]
33381    #[doc = "ID: 435"]
33382    AVAILABLE_MODES(AVAILABLE_MODES_DATA),
33383    #[doc = "A change to the sequence number indicates that the set of AVAILABLE_MODES has changed.         A receiver must re-request all available modes whenever the sequence number changes.         This is only emitted after the first change and should then be broadcast at low rate (nominally 0.3 Hz) and on change.         See <https://mavlink.io/en/services/standard_modes.html>."]
33384    #[doc = ""]
33385    #[doc = "ID: 437"]
33386    AVAILABLE_MODES_MONITOR(AVAILABLE_MODES_MONITOR_DATA),
33387    #[doc = "Battery information that is static, or requires infrequent update.         This message should requested using MAV_CMD_REQUEST_MESSAGE and/or streamed at very low rate.         BATTERY_STATUS_V2 is used for higher-rate battery status information."]
33388    #[doc = ""]
33389    #[doc = "ID: 372"]
33390    BATTERY_INFO(BATTERY_INFO_DATA),
33391    #[doc = "Battery information. Updates GCS with flight controller battery status. Smart batteries also use this message, but may additionally send BATTERY_INFO."]
33392    #[doc = ""]
33393    #[doc = "ID: 147"]
33394    BATTERY_STATUS(BATTERY_STATUS_DATA),
33395    #[doc = "Report button state change."]
33396    #[doc = ""]
33397    #[doc = "ID: 257"]
33398    BUTTON_CHANGE(BUTTON_CHANGE_DATA),
33399    #[doc = "Information about the status of a capture. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
33400    #[doc = ""]
33401    #[doc = "ID: 262"]
33402    CAMERA_CAPTURE_STATUS(CAMERA_CAPTURE_STATUS_DATA),
33403    #[doc = "Information about the field of view of a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
33404    #[doc = ""]
33405    #[doc = "ID: 271"]
33406    CAMERA_FOV_STATUS(CAMERA_FOV_STATUS_DATA),
33407    #[doc = "Information about a captured image. This is emitted every time a message is captured.         MAV_CMD_REQUEST_MESSAGE can be used to (re)request this message for a specific sequence number or range of sequence numbers:         MAV_CMD_REQUEST_MESSAGE.param2 indicates the sequence number the first image to send, or set to -1 to send the message for all sequence numbers.         MAV_CMD_REQUEST_MESSAGE.param3 is used to specify a range of messages to send:         set to 0 (default) to send just the the message for the sequence number in param 2,         set to -1 to send the message for the sequence number in param 2 and all the following sequence numbers,         set to the sequence number of the final message in the range."]
33408    #[doc = ""]
33409    #[doc = "ID: 263"]
33410    CAMERA_IMAGE_CAPTURED(CAMERA_IMAGE_CAPTURED_DATA),
33411    #[doc = "Information about a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
33412    #[doc = ""]
33413    #[doc = "ID: 259"]
33414    CAMERA_INFORMATION(CAMERA_INFORMATION_DATA),
33415    #[doc = "Settings of a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
33416    #[doc = ""]
33417    #[doc = "ID: 260"]
33418    CAMERA_SETTINGS(CAMERA_SETTINGS_DATA),
33419    #[doc = "Camera absolute thermal range. This can be streamed when the associated VIDEO_STREAM_STATUS `flag` field bit VIDEO_STREAM_STATUS_FLAGS_THERMAL_RANGE_ENABLED is set, but a GCS may choose to only request it for the current active stream. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval (param3 indicates the stream id of the current camera, or 0 for all streams, param4 indicates the target camera_device_id for autopilot-attached cameras or 0 for MAVLink cameras)."]
33420    #[doc = ""]
33421    #[doc = "ID: 277"]
33422    CAMERA_THERMAL_RANGE(CAMERA_THERMAL_RANGE_DATA),
33423    #[doc = "Camera tracking status, sent while in active tracking. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval."]
33424    #[doc = ""]
33425    #[doc = "ID: 276"]
33426    CAMERA_TRACKING_GEO_STATUS(CAMERA_TRACKING_GEO_STATUS_DATA),
33427    #[doc = "Camera tracking status, sent while in active tracking. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval."]
33428    #[doc = ""]
33429    #[doc = "ID: 275"]
33430    CAMERA_TRACKING_IMAGE_STATUS(CAMERA_TRACKING_IMAGE_STATUS_DATA),
33431    #[doc = "Camera-IMU triggering and synchronisation message."]
33432    #[doc = ""]
33433    #[doc = "ID: 112"]
33434    CAMERA_TRIGGER(CAMERA_TRIGGER_DATA),
33435    #[doc = "A forwarded CANFD frame as requested by MAV_CMD_CAN_FORWARD. These are separated from CAN_FRAME as they need different handling (eg. TAO handling)."]
33436    #[doc = ""]
33437    #[doc = "ID: 387"]
33438    CANFD_FRAME(CANFD_FRAME_DATA),
33439    #[doc = "Modify the filter of what CAN messages to forward over the mavlink. This can be used to make CAN forwarding work well on low bandwidth links. The filtering is applied on bits 8 to 24 of the CAN id (2nd and 3rd bytes) which corresponds to the DroneCAN message ID for DroneCAN. Filters with more than 16 IDs can be constructed by sending multiple CAN_FILTER_MODIFY messages."]
33440    #[doc = ""]
33441    #[doc = "ID: 388"]
33442    CAN_FILTER_MODIFY(CAN_FILTER_MODIFY_DATA),
33443    #[doc = "A forwarded CAN frame as requested by MAV_CMD_CAN_FORWARD."]
33444    #[doc = ""]
33445    #[doc = "ID: 386"]
33446    CAN_FRAME(CAN_FRAME_DATA),
33447    #[doc = "Configure cellular modems.         This message is re-emitted as an acknowledgement by the modem.         The message may also be explicitly requested using MAV_CMD_REQUEST_MESSAGE."]
33448    #[doc = ""]
33449    #[doc = "ID: 336"]
33450    CELLULAR_CONFIG(CELLULAR_CONFIG_DATA),
33451    #[doc = "Report current used cellular network status."]
33452    #[doc = ""]
33453    #[doc = "ID: 334"]
33454    CELLULAR_STATUS(CELLULAR_STATUS_DATA),
33455    #[doc = "Request to control this MAV."]
33456    #[doc = ""]
33457    #[doc = "ID: 5"]
33458    CHANGE_OPERATOR_CONTROL(CHANGE_OPERATOR_CONTROL_DATA),
33459    #[doc = "Accept / deny control of this MAV."]
33460    #[doc = ""]
33461    #[doc = "ID: 6"]
33462    CHANGE_OPERATOR_CONTROL_ACK(CHANGE_OPERATOR_CONTROL_ACK_DATA),
33463    #[doc = "Information about a potential collision."]
33464    #[doc = ""]
33465    #[doc = "ID: 247"]
33466    COLLISION(COLLISION_DATA),
33467    #[doc = "Report status of a command. Includes feedback whether the command was executed. The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
33468    #[doc = ""]
33469    #[doc = "ID: 77"]
33470    COMMAND_ACK(COMMAND_ACK_DATA),
33471    #[doc = "Cancel a long running command. The target system should respond with a COMMAND_ACK to the original command with result=MAV_RESULT_CANCELLED if the long running process was cancelled. If it has already completed, the cancel action can be ignored. The cancel action can be retried until some sort of acknowledgement to the original command has been received. The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
33472    #[doc = ""]
33473    #[doc = "ID: 80"]
33474    COMMAND_CANCEL(COMMAND_CANCEL_DATA),
33475    #[doc = "Send a command with up to seven parameters to the MAV, where params 5 and 6 are integers and the other values are floats. This is preferred over COMMAND_LONG as it allows the MAV_FRAME to be specified for interpreting positional information, such as altitude. COMMAND_INT is also preferred when sending latitude and longitude data in params 5 and 6, as it allows for greater precision. Param 5 and 6 encode positional data as scaled integers, where the scaling depends on the actual command value. NaN or INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current latitude, yaw rather than a specific value). The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
33476    #[doc = ""]
33477    #[doc = "ID: 75"]
33478    COMMAND_INT(COMMAND_INT_DATA),
33479    #[doc = "Message encoding a command with parameters as scaled integers and additional metadata. Scaling depends on the actual command value."]
33480    #[doc = ""]
33481    #[doc = "ID: 223"]
33482    COMMAND_INT_STAMPED(COMMAND_INT_STAMPED_DATA),
33483    #[doc = "Send a command with up to seven parameters to the MAV. COMMAND_INT is generally preferred when sending MAV_CMD commands that include positional information; it offers higher precision and allows the MAV_FRAME to be specified (which may otherwise be ambiguous, particularly for altitude). The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
33484    #[doc = ""]
33485    #[doc = "ID: 76"]
33486    COMMAND_LONG(COMMAND_LONG_DATA),
33487    #[doc = "Send a command with up to seven parameters to the MAV and additional metadata."]
33488    #[doc = ""]
33489    #[doc = "ID: 224"]
33490    COMMAND_LONG_STAMPED(COMMAND_LONG_STAMPED_DATA),
33491    #[doc = "Component information message, which may be requested using MAV_CMD_REQUEST_MESSAGE."]
33492    #[doc = ""]
33493    #[doc = "ID: 395"]
33494    #[deprecated = " See `COMPONENT_METADATA` (Deprecated since 2022-04)"]
33495    COMPONENT_INFORMATION(COMPONENT_INFORMATION_DATA),
33496    #[doc = "Basic component information data. Should be requested using MAV_CMD_REQUEST_MESSAGE on startup, or when required."]
33497    #[doc = ""]
33498    #[doc = "ID: 396"]
33499    COMPONENT_INFORMATION_BASIC(COMPONENT_INFORMATION_BASIC_DATA),
33500    #[doc = "Component metadata message, which may be requested using MAV_CMD_REQUEST_MESSAGE.          This contains the MAVLink FTP URI and CRC for the component's general metadata file.         The file must be hosted on the component, and may be xz compressed.         The file CRC can be used for file caching.          The general metadata file can be read to get the locations of other metadata files (COMP_METADATA_TYPE) and translations, which may be hosted either on the vehicle or the internet.         For more information see: <https://mavlink.io/en/services/component_information.html>.          Note: Camera components should use CAMERA_INFORMATION instead, and autopilots may use both this message and AUTOPILOT_VERSION."]
33501    #[doc = ""]
33502    #[doc = "ID: 397"]
33503    COMPONENT_METADATA(COMPONENT_METADATA_DATA),
33504    #[doc = "The smoothed, monotonic system state used to feed the control loops of the system."]
33505    #[doc = ""]
33506    #[doc = "ID: 146"]
33507    CONTROL_SYSTEM_STATE(CONTROL_SYSTEM_STATE_DATA),
33508    #[doc = "Regular broadcast for the current latest event sequence number for a component. This is used to check for dropped events."]
33509    #[doc = ""]
33510    #[doc = "ID: 411"]
33511    CURRENT_EVENT_SEQUENCE(CURRENT_EVENT_SEQUENCE_DATA),
33512    #[doc = "Get the current mode.         This should be emitted on any mode change, and broadcast at low rate (nominally 0.5 Hz).         It may be requested using MAV_CMD_REQUEST_MESSAGE.         See <https://mavlink.io/en/services/standard_modes.html>."]
33513    #[doc = ""]
33514    #[doc = "ID: 436"]
33515    CURRENT_MODE(CURRENT_MODE_DATA),
33516    #[doc = "Data stream status information."]
33517    #[doc = ""]
33518    #[doc = "ID: 67"]
33519    #[deprecated = " See `MESSAGE_INTERVAL` (Deprecated since 2015-08)"]
33520    DATA_STREAM(DATA_STREAM_DATA),
33521    #[doc = "Handshake message to initiate, control and stop image streaming when using the Image Transmission Protocol: <https://mavlink.io/en/services/image_transmission.html>."]
33522    #[doc = ""]
33523    #[doc = "ID: 130"]
33524    DATA_TRANSMISSION_HANDSHAKE(DATA_TRANSMISSION_HANDSHAKE_DATA),
33525    #[doc = "Send a debug value. The index is used to discriminate between values. These values show up in the plot of QGroundControl as DEBUG N."]
33526    #[doc = ""]
33527    #[doc = "ID: 254"]
33528    DEBUG(DEBUG_DATA),
33529    #[doc = "Large debug/prototyping array. The message uses the maximum available payload for data. The array_id and name fields are used to discriminate between messages in code and in user interfaces (respectively). Do not use in production code."]
33530    #[doc = ""]
33531    #[doc = "ID: 350"]
33532    DEBUG_FLOAT_ARRAY(DEBUG_FLOAT_ARRAY_DATA),
33533    #[doc = "To debug something using a named 3D vector."]
33534    #[doc = ""]
33535    #[doc = "ID: 250"]
33536    DEBUG_VECT(DEBUG_VECT_DATA),
33537    #[doc = "Distance sensor information for an onboard rangefinder."]
33538    #[doc = ""]
33539    #[doc = "ID: 132"]
33540    DISTANCE_SENSOR(DISTANCE_SENSOR_DATA),
33541    #[doc = "EFI status output."]
33542    #[doc = ""]
33543    #[doc = "ID: 225"]
33544    EFI_STATUS(EFI_STATUS_DATA),
33545    #[doc = "Extended EKF state estimates for ASLUAVs."]
33546    #[doc = ""]
33547    #[doc = "ID: 8007"]
33548    EKF_EXT(EKF_EXT_DATA),
33549    #[doc = "Data packet for images sent using the Image Transmission Protocol: <https://mavlink.io/en/services/image_transmission.html>."]
33550    #[doc = ""]
33551    #[doc = "ID: 131"]
33552    ENCAPSULATED_DATA(ENCAPSULATED_DATA_DATA),
33553    #[doc = "ESC information for lower rate streaming. Recommended streaming rate 1Hz. See ESC_STATUS for higher-rate ESC data."]
33554    #[doc = ""]
33555    #[doc = "ID: 290"]
33556    ESC_INFO(ESC_INFO_DATA),
33557    #[doc = "ESC information for higher rate streaming. Recommended streaming rate is ~10 Hz. Information that changes more slowly is sent in ESC_INFO. It should typically only be streamed on high-bandwidth links (i.e. to a companion computer)."]
33558    #[doc = ""]
33559    #[doc = "ID: 291"]
33560    ESC_STATUS(ESC_STATUS_DATA),
33561    #[doc = "Estimator status message including flags, innovation test ratios and estimated accuracies. The flags message is an integer bitmask containing information on which EKF outputs are valid. See the ESTIMATOR_STATUS_FLAGS enum definition for further information. The innovation test ratios show the magnitude of the sensor innovation divided by the innovation check threshold. Under normal operation the innovation test ratios should be below 0.5 with occasional values up to 1.0. Values greater than 1.0 should be rare under normal operation and indicate that a measurement has been rejected by the filter. The user should be notified if an innovation test ratio greater than 1.0 is recorded. Notifications for values in the range between 0.5 and 1.0 should be optional and controllable by the user."]
33562    #[doc = ""]
33563    #[doc = "ID: 230"]
33564    ESTIMATOR_STATUS(ESTIMATOR_STATUS_DATA),
33565    #[doc = "Event message. Each new event from a particular component gets a new sequence number. The same message might be sent multiple times if (re-)requested. Most events are broadcast, some can be specific to a target component (as receivers keep track of the sequence for missed events, all events need to be broadcast. Thus we use destination_component instead of target_component)."]
33566    #[doc = ""]
33567    #[doc = "ID: 410"]
33568    EVENT(EVENT_DATA),
33569    #[doc = "Provides state for additional features."]
33570    #[doc = ""]
33571    #[doc = "ID: 245"]
33572    EXTENDED_SYS_STATE(EXTENDED_SYS_STATE_DATA),
33573    #[doc = "Status of geo-fencing. Sent in extended status stream when fencing enabled."]
33574    #[doc = ""]
33575    #[doc = "ID: 162"]
33576    FENCE_STATUS(FENCE_STATUS_DATA),
33577    #[doc = "File transfer protocol message: <https://mavlink.io/en/services/ftp.html>."]
33578    #[doc = ""]
33579    #[doc = "ID: 110"]
33580    FILE_TRANSFER_PROTOCOL(FILE_TRANSFER_PROTOCOL_DATA),
33581    #[doc = "Flight information.         This includes time since boot for arm, takeoff, and land, and a flight number.         Takeoff and landing values reset to zero on arm.         This can be requested using MAV_CMD_REQUEST_MESSAGE.         Note, some fields are misnamed - timestamps are from boot (not UTC) and the flight_uuid is a sequence number."]
33582    #[doc = ""]
33583    #[doc = "ID: 264"]
33584    FLIGHT_INFORMATION(FLIGHT_INFORMATION_DATA),
33585    #[doc = "Current motion information from a designated system."]
33586    #[doc = ""]
33587    #[doc = "ID: 144"]
33588    FOLLOW_TARGET(FOLLOW_TARGET_DATA),
33589    #[doc = "Fuel status.         This message provides \"generic\" fuel level information for  in a GCS and for triggering failsafes in an autopilot.         The fuel type and associated units for fields in this message are defined in the enum MAV_FUEL_TYPE.          The reported `consumed_fuel` and `remaining_fuel` must only be supplied if measured: they must not be inferred from the `maximum_fuel` and the other value.         A recipient can assume that if these fields are supplied they are accurate.         If not provided, the recipient can infer `remaining_fuel` from `maximum_fuel` and `consumed_fuel` on the assumption that the fuel was initially at its maximum (this is what battery monitors assume).         Note however that this is an assumption, and the UI should prompt the user appropriately (i.e. notify user that they should fill the tank before boot).          This kind of information may also be sent in fuel-specific messages such as BATTERY_STATUS_V2.         If both messages are sent for the same fuel system, the ids and corresponding information must match.          This should be streamed (nominally at 0.1 Hz)."]
33590    #[doc = ""]
33591    #[doc = "ID: 371"]
33592    FUEL_STATUS(FUEL_STATUS_DATA),
33593    #[doc = "Fixed-wing soaring (i.e. thermal seeking) data."]
33594    #[doc = ""]
33595    #[doc = "ID: 8011"]
33596    FW_SOARING_DATA(FW_SOARING_DATA_DATA),
33597    #[doc = "Telemetry of power generation system. Alternator or mechanical generator."]
33598    #[doc = ""]
33599    #[doc = "ID: 373"]
33600    GENERATOR_STATUS(GENERATOR_STATUS_DATA),
33601    #[doc = "Message reporting the status of a gimbal device. \t  This message should be broadcast by a gimbal device component at a low regular rate (e.g. 5 Hz). \t  For the angles encoded in the quaternion and the angular velocities holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME is set, then they are relative to the vehicle heading (vehicle frame). \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is set, then they are relative to absolute North (earth frame). \t  If neither of these flags are set, then (for backwards compatibility) it holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_LOCK is set, then they are relative to absolute North (earth frame), \t  else they are relative to the vehicle heading (vehicle frame). \t  Other conditions of the flags are not allowed. \t  The quaternion and angular velocities in the other frame can be calculated from delta_yaw and delta_yaw_velocity as \t  q_earth = q_delta_yaw * q_vehicle and w_earth = w_delta_yaw_velocity + w_vehicle (if not NaN). \t  If neither the GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME nor the GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME flag is set, \t  then (for backwards compatibility) the data in the delta_yaw and delta_yaw_velocity fields are to be ignored. \t  New implementations should always set either GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME or GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME, \t  and always should set delta_yaw and delta_yaw_velocity either to the proper value or NaN."]
33602    #[doc = ""]
33603    #[doc = "ID: 285"]
33604    GIMBAL_DEVICE_ATTITUDE_STATUS(GIMBAL_DEVICE_ATTITUDE_STATUS_DATA),
33605    #[doc = "Information about a low level gimbal. This message should be requested by the gimbal manager or a ground station using MAV_CMD_REQUEST_MESSAGE. The maximum angles and rates are the limits by hardware. However, the limits by software used are likely different/smaller and dependent on mode/settings/etc.."]
33606    #[doc = ""]
33607    #[doc = "ID: 283"]
33608    GIMBAL_DEVICE_INFORMATION(GIMBAL_DEVICE_INFORMATION_DATA),
33609    #[doc = "Low level message to control a gimbal device's attitude. \t  This message is to be sent from the gimbal manager to the gimbal device component. \t  The quaternion and angular velocities can be set to NaN according to use case. \t  For the angles encoded in the quaternion and the angular velocities holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME is set, then they are relative to the vehicle heading (vehicle frame). \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is set, then they are relative to absolute North (earth frame). \t  If neither of these flags are set, then (for backwards compatibility) it holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_LOCK is set, then they are relative to absolute North (earth frame), \t  else they are relative to the vehicle heading (vehicle frame). \t  Setting both GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME and GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is not allowed. \t  These rules are to ensure backwards compatibility. \t  New implementations should always set either GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME or GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME."]
33610    #[doc = ""]
33611    #[doc = "ID: 284"]
33612    GIMBAL_DEVICE_SET_ATTITUDE(GIMBAL_DEVICE_SET_ATTITUDE_DATA),
33613    #[doc = "Information about a high level gimbal manager. This message should be requested by a ground station using MAV_CMD_REQUEST_MESSAGE."]
33614    #[doc = ""]
33615    #[doc = "ID: 280"]
33616    GIMBAL_MANAGER_INFORMATION(GIMBAL_MANAGER_INFORMATION_DATA),
33617    #[doc = "High level message to control a gimbal's attitude. This message is to be sent to the gimbal manager (e.g. from a ground station). Angles and rates can be set to NaN according to use case."]
33618    #[doc = ""]
33619    #[doc = "ID: 282"]
33620    GIMBAL_MANAGER_SET_ATTITUDE(GIMBAL_MANAGER_SET_ATTITUDE_DATA),
33621    #[doc = "High level message to control a gimbal manually. The angles or angular rates are unitless; the actual rates will depend on internal gimbal manager settings/configuration (e.g. set by parameters). This message is to be sent to the gimbal manager (e.g. from a ground station). Angles and rates can be set to NaN according to use case."]
33622    #[doc = ""]
33623    #[doc = "ID: 288"]
33624    GIMBAL_MANAGER_SET_MANUAL_CONTROL(GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA),
33625    #[doc = "Set gimbal manager pitch and yaw angles (high rate message). This message is to be sent to the gimbal manager (e.g. from a ground station) and will be ignored by gimbal devices. Angles and rates can be set to NaN according to use case. Use MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW for low-rate adjustments that require confirmation."]
33626    #[doc = ""]
33627    #[doc = "ID: 287"]
33628    GIMBAL_MANAGER_SET_PITCHYAW(GIMBAL_MANAGER_SET_PITCHYAW_DATA),
33629    #[doc = "Current status about a high level gimbal manager. This message should be broadcast at a low regular rate (e.g. 5Hz)."]
33630    #[doc = ""]
33631    #[doc = "ID: 281"]
33632    GIMBAL_MANAGER_STATUS(GIMBAL_MANAGER_STATUS_DATA),
33633    #[doc = "The filtered global position (e.g. fused GPS and accelerometers). The position is in GPS-frame (right-handed, Z-up). It                is designed as scaled integer message since the resolution of float is not sufficient."]
33634    #[doc = ""]
33635    #[doc = "ID: 33"]
33636    GLOBAL_POSITION_INT(GLOBAL_POSITION_INT_DATA),
33637    #[doc = "The filtered global position (e.g. fused GPS and accelerometers). The position is in GPS-frame (right-handed, Z-up). It  is designed as scaled integer message since the resolution of float is not sufficient. NOTE: This message is intended for onboard networks / companion computers and higher-bandwidth links and optimized for accuracy and completeness. Please use the GLOBAL_POSITION_INT message for a minimal subset."]
33638    #[doc = ""]
33639    #[doc = "ID: 63"]
33640    GLOBAL_POSITION_INT_COV(GLOBAL_POSITION_INT_COV_DATA),
33641    #[doc = "Global position/attitude estimate from a vision source."]
33642    #[doc = ""]
33643    #[doc = "ID: 101"]
33644    GLOBAL_VISION_POSITION_ESTIMATE(GLOBAL_VISION_POSITION_ESTIMATE_DATA),
33645    #[doc = "Second GPS data."]
33646    #[doc = ""]
33647    #[doc = "ID: 124"]
33648    GPS2_RAW(GPS2_RAW_DATA),
33649    #[doc = "RTK GPS data. Gives information on the relative baseline calculation the GPS is reporting."]
33650    #[doc = ""]
33651    #[doc = "ID: 128"]
33652    GPS2_RTK(GPS2_RTK_DATA),
33653    #[doc = "Publishes the GPS coordinates of the vehicle local origin (0,0,0) position. Emitted whenever a new GPS-Local position mapping is requested or set - e.g. following SET_GPS_GLOBAL_ORIGIN message."]
33654    #[doc = ""]
33655    #[doc = "ID: 49"]
33656    GPS_GLOBAL_ORIGIN(GPS_GLOBAL_ORIGIN_DATA),
33657    #[doc = "Data for injecting into the onboard GPS (used for DGPS)."]
33658    #[doc = ""]
33659    #[doc = "ID: 123"]
33660    #[deprecated = " See `GPS_RTCM_DATA` (Deprecated since 2022-05)"]
33661    GPS_INJECT_DATA(GPS_INJECT_DATA_DATA),
33662    #[doc = "GPS sensor input message.  This is a raw sensor value sent by the GPS. This is NOT the global position estimate of the system."]
33663    #[doc = ""]
33664    #[doc = "ID: 232"]
33665    GPS_INPUT(GPS_INPUT_DATA),
33666    #[doc = "The global position, as returned by the Global Positioning System (GPS). This is                 NOT the global position estimate of the system, but rather a RAW sensor value. See message GLOBAL_POSITION_INT for the global position estimate."]
33667    #[doc = ""]
33668    #[doc = "ID: 24"]
33669    GPS_RAW_INT(GPS_RAW_INT_DATA),
33670    #[doc = "RTCM message for injecting into the onboard GPS (used for DGPS)."]
33671    #[doc = ""]
33672    #[doc = "ID: 233"]
33673    GPS_RTCM_DATA(GPS_RTCM_DATA_DATA),
33674    #[doc = "RTK GPS data. Gives information on the relative baseline calculation the GPS is reporting."]
33675    #[doc = ""]
33676    #[doc = "ID: 127"]
33677    GPS_RTK(GPS_RTK_DATA),
33678    #[doc = "The positioning status, as reported by GPS. This message is intended to display status information about each satellite visible to the receiver. See message GLOBAL_POSITION_INT for the global position estimate. This message can contain information for up to 20 satellites."]
33679    #[doc = ""]
33680    #[doc = "ID: 25"]
33681    GPS_STATUS(GPS_STATUS_DATA),
33682    #[doc = "Status of GSM modem (connected to onboard computer)."]
33683    #[doc = ""]
33684    #[doc = "ID: 8014"]
33685    GSM_LINK_STATUS(GSM_LINK_STATUS_DATA),
33686    #[doc = "The heartbeat message shows that a system or component is present and responding. The type and autopilot fields (along with the message component id), allow the receiving system to treat further messages from this system appropriately (e.g. by laying out the user interface based on the autopilot). This microservice is documented at <https://mavlink.io/en/services/heartbeat.html>."]
33687    #[doc = ""]
33688    #[doc = "ID: 0"]
33689    HEARTBEAT(HEARTBEAT_DATA),
33690    #[doc = "The IMU readings in SI units in NED body frame."]
33691    #[doc = ""]
33692    #[doc = "ID: 105"]
33693    HIGHRES_IMU(HIGHRES_IMU_DATA),
33694    #[doc = "Message appropriate for high latency connections like Iridium."]
33695    #[doc = ""]
33696    #[doc = "ID: 234"]
33697    #[deprecated = " See `HIGH_LATENCY2` (Deprecated since 2020-10)"]
33698    HIGH_LATENCY(HIGH_LATENCY_DATA),
33699    #[doc = "Message appropriate for high latency connections like Iridium (version 2)."]
33700    #[doc = ""]
33701    #[doc = "ID: 235"]
33702    HIGH_LATENCY2(HIGH_LATENCY2_DATA),
33703    #[doc = "Sent from autopilot to simulation. Hardware in the loop control outputs. Alternative to HIL_CONTROLS."]
33704    #[doc = ""]
33705    #[doc = "ID: 93"]
33706    HIL_ACTUATOR_CONTROLS(HIL_ACTUATOR_CONTROLS_DATA),
33707    #[doc = "Sent from autopilot to simulation. Hardware in the loop control outputs. Alternative to HIL_ACTUATOR_CONTROLS."]
33708    #[doc = ""]
33709    #[doc = "ID: 91"]
33710    HIL_CONTROLS(HIL_CONTROLS_DATA),
33711    #[doc = "The global position, as returned by the Global Positioning System (GPS). This is                  NOT the global position estimate of the system, but rather a RAW sensor value. See message GLOBAL_POSITION_INT for the global position estimate."]
33712    #[doc = ""]
33713    #[doc = "ID: 113"]
33714    HIL_GPS(HIL_GPS_DATA),
33715    #[doc = "Simulated optical flow from a flow sensor (e.g. PX4FLOW or optical mouse sensor)."]
33716    #[doc = ""]
33717    #[doc = "ID: 114"]
33718    HIL_OPTICAL_FLOW(HIL_OPTICAL_FLOW_DATA),
33719    #[doc = "Sent from simulation to autopilot. The RAW values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. Individual receivers/transmitters might violate this specification."]
33720    #[doc = ""]
33721    #[doc = "ID: 92"]
33722    HIL_RC_INPUTS_RAW(HIL_RC_INPUTS_RAW_DATA),
33723    #[doc = "The IMU readings in SI units in NED body frame."]
33724    #[doc = ""]
33725    #[doc = "ID: 107"]
33726    HIL_SENSOR(HIL_SENSOR_DATA),
33727    #[doc = "Sent from simulation to autopilot. This packet is useful for high throughput applications such as hardware in the loop simulations."]
33728    #[doc = ""]
33729    #[doc = "ID: 90"]
33730    #[deprecated = "Suffers from missing airspeed fields and singularities due to Euler angles. See `HIL_STATE_QUATERNION` (Deprecated since 2013-07)"]
33731    HIL_STATE(HIL_STATE_DATA),
33732    #[doc = "Sent from simulation to autopilot, avoids in contrast to HIL_STATE singularities. This packet is useful for high throughput applications such as hardware in the loop simulations."]
33733    #[doc = ""]
33734    #[doc = "ID: 115"]
33735    HIL_STATE_QUATERNION(HIL_STATE_QUATERNION_DATA),
33736    #[doc = "Contains the home position. \tThe home position is the default position that the system will return to and land on. \tThe position must be set automatically by the system during the takeoff, and may also be explicitly set using MAV_CMD_DO_SET_HOME. \tThe global and local positions encode the position in the respective coordinate frames, while the q parameter encodes the orientation of the surface. \tUnder normal conditions it describes the heading and terrain slope, which can be used by the aircraft to adjust the approach. \tThe approach 3D vector describes the point to which the system should fly in normal flight mode and then perform a landing sequence along the vector.         Note: this message can be requested by sending the MAV_CMD_REQUEST_MESSAGE with param1=242 (or the deprecated MAV_CMD_GET_HOME_POSITION command)."]
33737    #[doc = ""]
33738    #[doc = "ID: 242"]
33739    HOME_POSITION(HOME_POSITION_DATA),
33740    #[doc = "Temperature and humidity from hygrometer."]
33741    #[doc = ""]
33742    #[doc = "ID: 12920"]
33743    HYGROMETER_SENSOR(HYGROMETER_SENSOR_DATA),
33744    #[doc = "Illuminator status."]
33745    #[doc = ""]
33746    #[doc = "ID: 440"]
33747    ILLUMINATOR_STATUS(ILLUMINATOR_STATUS_DATA),
33748    #[doc = "Status of the Iridium SBD link."]
33749    #[doc = ""]
33750    #[doc = "ID: 335"]
33751    ISBD_LINK_STATUS(ISBD_LINK_STATUS_DATA),
33752    #[doc = "The location of a landing target. See: <https://mavlink.io/en/services/landing_target.html>."]
33753    #[doc = ""]
33754    #[doc = "ID: 149"]
33755    LANDING_TARGET(LANDING_TARGET_DATA),
33756    #[doc = "Status generated in each node in the communication chain and injected into MAVLink stream."]
33757    #[doc = ""]
33758    #[doc = "ID: 8"]
33759    LINK_NODE_STATUS(LINK_NODE_STATUS_DATA),
33760    #[doc = "The filtered local position (e.g. fused computer vision and accelerometers). Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
33761    #[doc = ""]
33762    #[doc = "ID: 32"]
33763    LOCAL_POSITION_NED(LOCAL_POSITION_NED_DATA),
33764    #[doc = "The filtered local position (e.g. fused computer vision and accelerometers). Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
33765    #[doc = ""]
33766    #[doc = "ID: 64"]
33767    LOCAL_POSITION_NED_COV(LOCAL_POSITION_NED_COV_DATA),
33768    #[doc = "The offset in X, Y, Z and yaw between the LOCAL_POSITION_NED messages of MAV X and the global coordinate frame in NED coordinates. Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
33769    #[doc = ""]
33770    #[doc = "ID: 89"]
33771    LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA),
33772    #[doc = "An ack for a LOGGING_DATA_ACKED message."]
33773    #[doc = ""]
33774    #[doc = "ID: 268"]
33775    LOGGING_ACK(LOGGING_ACK_DATA),
33776    #[doc = "A message containing logged data (see also MAV_CMD_LOGGING_START)."]
33777    #[doc = ""]
33778    #[doc = "ID: 266"]
33779    LOGGING_DATA(LOGGING_DATA_DATA),
33780    #[doc = "A message containing logged data which requires a LOGGING_ACK to be sent back."]
33781    #[doc = ""]
33782    #[doc = "ID: 267"]
33783    LOGGING_DATA_ACKED(LOGGING_DATA_ACKED_DATA),
33784    #[doc = "Reply to LOG_REQUEST_DATA."]
33785    #[doc = ""]
33786    #[doc = "ID: 120"]
33787    LOG_DATA(LOG_DATA_DATA),
33788    #[doc = "Reply to LOG_REQUEST_LIST."]
33789    #[doc = ""]
33790    #[doc = "ID: 118"]
33791    LOG_ENTRY(LOG_ENTRY_DATA),
33792    #[doc = "Erase all logs."]
33793    #[doc = ""]
33794    #[doc = "ID: 121"]
33795    LOG_ERASE(LOG_ERASE_DATA),
33796    #[doc = "Request a chunk of a log."]
33797    #[doc = ""]
33798    #[doc = "ID: 119"]
33799    LOG_REQUEST_DATA(LOG_REQUEST_DATA_DATA),
33800    #[doc = "Stop log transfer and resume normal logging."]
33801    #[doc = ""]
33802    #[doc = "ID: 122"]
33803    LOG_REQUEST_END(LOG_REQUEST_END_DATA),
33804    #[doc = "Request a list of available logs. On some systems calling this may stop on-board logging until LOG_REQUEST_END is called. If there are no log files available this request shall be answered with one LOG_ENTRY message with id = 0 and num_logs = 0."]
33805    #[doc = ""]
33806    #[doc = "ID: 117"]
33807    LOG_REQUEST_LIST(LOG_REQUEST_LIST_DATA),
33808    #[doc = "Reports results of completed compass calibration. Sent until MAG_CAL_ACK received."]
33809    #[doc = ""]
33810    #[doc = "ID: 192"]
33811    MAG_CAL_REPORT(MAG_CAL_REPORT_DATA),
33812    #[doc = "This message provides an API for manually controlling the vehicle using standard joystick axes nomenclature, along with a joystick-like input device. Unused axes can be disabled and buttons states are transmitted as individual on/off bits of a bitmask."]
33813    #[doc = ""]
33814    #[doc = "ID: 69"]
33815    MANUAL_CONTROL(MANUAL_CONTROL_DATA),
33816    #[doc = "Setpoint in roll, pitch, yaw and thrust from the operator."]
33817    #[doc = ""]
33818    #[doc = "ID: 81"]
33819    MANUAL_SETPOINT(MANUAL_SETPOINT_DATA),
33820    #[doc = "Send raw controller memory. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
33821    #[doc = ""]
33822    #[doc = "ID: 249"]
33823    MEMORY_VECT(MEMORY_VECT_DATA),
33824    #[doc = "The interval between messages for a particular MAVLink message ID.         This message is sent in response to the MAV_CMD_REQUEST_MESSAGE command with param1=244 (this message) and param2=message_id (the id of the message for which the interval is required). \tIt may also be sent in response to MAV_CMD_GET_MESSAGE_INTERVAL. \tThis interface replaces DATA_STREAM."]
33825    #[doc = ""]
33826    #[doc = "ID: 244"]
33827    MESSAGE_INTERVAL(MESSAGE_INTERVAL_DATA),
33828    #[doc = "Acknowledgment message during waypoint handling. The type field states if this message is a positive ack (type=0) or if an error happened (type=non-zero)."]
33829    #[doc = ""]
33830    #[doc = "ID: 47"]
33831    MISSION_ACK(MISSION_ACK_DATA),
33832    #[doc = "Delete all mission items at once."]
33833    #[doc = ""]
33834    #[doc = "ID: 45"]
33835    MISSION_CLEAR_ALL(MISSION_CLEAR_ALL_DATA),
33836    #[doc = "This message is emitted as response to MISSION_REQUEST_LIST by the MAV and to initiate a write transaction. The GCS can then request the individual mission item based on the knowledge of the total number of waypoints."]
33837    #[doc = ""]
33838    #[doc = "ID: 44"]
33839    MISSION_COUNT(MISSION_COUNT_DATA),
33840    #[doc = "Message that announces the sequence number of the current target mission item (that the system will fly towards/execute when the mission is running).         This message should be streamed all the time (nominally at 1Hz).         This message should be emitted following a call to MAV_CMD_DO_SET_MISSION_CURRENT or MISSION_SET_CURRENT."]
33841    #[doc = ""]
33842    #[doc = "ID: 42"]
33843    MISSION_CURRENT(MISSION_CURRENT_DATA),
33844    #[doc = "Message encoding a mission item. This message is emitted to announce                 the presence of a mission item and to set a mission item on the system. The mission item can be either in x, y, z meters (type: LOCAL) or x:lat, y:lon, z:altitude. Local frame is Z-down, right handed (NED), global frame is Z-up, right handed (ENU). NaN may be used to indicate an optional/default value (e.g. to use the system's current latitude or yaw rather than a specific value). See also <https://mavlink.io/en/services/mission.html>."]
33845    #[doc = ""]
33846    #[doc = "ID: 39"]
33847    #[deprecated = " See `MISSION_ITEM_INT` (Deprecated since 2020-06)"]
33848    MISSION_ITEM(MISSION_ITEM_DATA),
33849    #[doc = "Message encoding a mission item. This message is emitted to announce                 the presence of a mission item and to set a mission item on the system. The mission item can be either in x, y, z meters (type: LOCAL) or x:lat, y:lon, z:altitude. Local frame is Z-down, right handed (NED), global frame is Z-up, right handed (ENU). NaN or INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current latitude, yaw rather than a specific value). See also <https://mavlink.io/en/services/mission.html>."]
33850    #[doc = ""]
33851    #[doc = "ID: 73"]
33852    MISSION_ITEM_INT(MISSION_ITEM_INT_DATA),
33853    #[doc = "A certain mission item has been reached. The system will either hold this position (or circle on the orbit) or (if the autocontinue on the WP was set) continue to the next waypoint."]
33854    #[doc = ""]
33855    #[doc = "ID: 46"]
33856    MISSION_ITEM_REACHED(MISSION_ITEM_REACHED_DATA),
33857    #[doc = "Request the information of the mission item with the sequence number seq. The response of the system to this message should be a MISSION_ITEM message. <https://mavlink.io/en/services/mission.html>."]
33858    #[doc = ""]
33859    #[doc = "ID: 40"]
33860    #[deprecated = "A system that gets this request should respond with MISSION_ITEM_INT (as though MISSION_REQUEST_INT was received). See `MISSION_REQUEST_INT` (Deprecated since 2020-06)"]
33861    MISSION_REQUEST(MISSION_REQUEST_DATA),
33862    #[doc = "Request the information of the mission item with the sequence number seq. The response of the system to this message should be a MISSION_ITEM_INT message. <https://mavlink.io/en/services/mission.html>."]
33863    #[doc = ""]
33864    #[doc = "ID: 51"]
33865    MISSION_REQUEST_INT(MISSION_REQUEST_INT_DATA),
33866    #[doc = "Request the overall list of mission items from the system/component."]
33867    #[doc = ""]
33868    #[doc = "ID: 43"]
33869    MISSION_REQUEST_LIST(MISSION_REQUEST_LIST_DATA),
33870    #[doc = "Request a partial list of mission items from the system/component. <https://mavlink.io/en/services/mission.html>. If start and end index are the same, just send one waypoint."]
33871    #[doc = ""]
33872    #[doc = "ID: 37"]
33873    MISSION_REQUEST_PARTIAL_LIST(MISSION_REQUEST_PARTIAL_LIST_DATA),
33874    #[doc = "Set the mission item with sequence number seq as the current item and emit MISSION_CURRENT (whether or not the mission number changed).         If a mission is currently being executed, the system will continue to this new mission item on the shortest path, skipping any intermediate mission items.         Note that mission jump repeat counters are not reset (see MAV_CMD_DO_JUMP param2).          This message may trigger a mission state-machine change on some systems: for example from MISSION_STATE_NOT_STARTED or MISSION_STATE_PAUSED to MISSION_STATE_ACTIVE.         If the system is in mission mode, on those systems this command might therefore start, restart or resume the mission.         If the system is not in mission mode this message must not trigger a switch to mission mode."]
33875    #[doc = ""]
33876    #[doc = "ID: 41"]
33877    #[deprecated = " See `MAV_CMD_DO_SET_MISSION_CURRENT` (Deprecated since 2022-08)"]
33878    MISSION_SET_CURRENT(MISSION_SET_CURRENT_DATA),
33879    #[doc = "This message is sent to the MAV to write a partial list. If start index == end index, only one item will be transmitted / updated. If the start index is NOT 0 and above the current list size, this request should be REJECTED!."]
33880    #[doc = ""]
33881    #[doc = "ID: 38"]
33882    MISSION_WRITE_PARTIAL_LIST(MISSION_WRITE_PARTIAL_LIST_DATA),
33883    #[doc = "Orientation of a mount."]
33884    #[doc = ""]
33885    #[doc = "ID: 265"]
33886    #[deprecated = "This message is being superseded by MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW. The message can still be used to communicate with legacy gimbals implementing it. See `MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW` (Deprecated since 2020-01)"]
33887    MOUNT_ORIENTATION(MOUNT_ORIENTATION_DATA),
33888    #[doc = "Send a key-value pair as float. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
33889    #[doc = ""]
33890    #[doc = "ID: 251"]
33891    NAMED_VALUE_FLOAT(NAMED_VALUE_FLOAT_DATA),
33892    #[doc = "Send a key-value pair as integer. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
33893    #[doc = ""]
33894    #[doc = "ID: 252"]
33895    NAMED_VALUE_INT(NAMED_VALUE_INT_DATA),
33896    #[doc = "The state of the navigation and position controller."]
33897    #[doc = ""]
33898    #[doc = "ID: 62"]
33899    NAV_CONTROLLER_OUTPUT(NAV_CONTROLLER_OUTPUT_DATA),
33900    #[doc = "Obstacle distances in front of the sensor, starting from the left in increment degrees to the right."]
33901    #[doc = ""]
33902    #[doc = "ID: 330"]
33903    OBSTACLE_DISTANCE(OBSTACLE_DISTANCE_DATA),
33904    #[doc = "Odometry message to communicate odometry information with an external interface. Fits ROS REP 147 standard for aerial vehicles (<http://www.ros.org/reps/rep-0147.html>)."]
33905    #[doc = ""]
33906    #[doc = "ID: 331"]
33907    ODOMETRY(ODOMETRY_DATA),
33908    #[doc = "Hardware status sent by an onboard computer."]
33909    #[doc = ""]
33910    #[doc = "ID: 390"]
33911    ONBOARD_COMPUTER_STATUS(ONBOARD_COMPUTER_STATUS_DATA),
33912    #[doc = "Transmitter (remote ID system) is enabled and ready to start sending location and other required information. This is streamed by transmitter. A flight controller uses it as a condition to arm."]
33913    #[doc = ""]
33914    #[doc = "ID: 12918"]
33915    OPEN_DRONE_ID_ARM_STATUS(OPEN_DRONE_ID_ARM_STATUS_DATA),
33916    #[doc = "Data for filling the OpenDroneID Authentication message. The Authentication Message defines a field that can provide a means of authenticity for the identity of the UAS (Unmanned Aircraft System). The Authentication message can have two different formats. For data page 0, the fields PageCount, Length and TimeStamp are present and AuthData is only 17 bytes. For data page 1 through 15, PageCount, Length and TimeStamp are not present and the size of AuthData is 23 bytes."]
33917    #[doc = ""]
33918    #[doc = "ID: 12902"]
33919    OPEN_DRONE_ID_AUTHENTICATION(OPEN_DRONE_ID_AUTHENTICATION_DATA),
33920    #[doc = "Data for filling the OpenDroneID Basic ID message. This and the below messages are primarily meant for feeding data to/from an OpenDroneID implementation. E.g. <https://github.com/opendroneid/opendroneid-core-c>. These messages are compatible with the ASTM F3411 Remote ID standard and the ASD-STAN prEN 4709-002 Direct Remote ID standard. Additional information and usage of these messages is documented at <https://mavlink.io/en/services/opendroneid.html>."]
33921    #[doc = ""]
33922    #[doc = "ID: 12900"]
33923    OPEN_DRONE_ID_BASIC_ID(OPEN_DRONE_ID_BASIC_ID_DATA),
33924    #[doc = "Data for filling the OpenDroneID Location message. The float data types are 32-bit IEEE 754. The Location message provides the location, altitude, direction and speed of the aircraft."]
33925    #[doc = ""]
33926    #[doc = "ID: 12901"]
33927    OPEN_DRONE_ID_LOCATION(OPEN_DRONE_ID_LOCATION_DATA),
33928    #[doc = "An OpenDroneID message pack is a container for multiple encoded OpenDroneID messages (i.e. not in the format given for the above message descriptions but after encoding into the compressed OpenDroneID byte format). Used e.g. when transmitting on Bluetooth 5.0 Long Range/Extended Advertising or on WiFi Neighbor Aware Networking or on WiFi Beacon."]
33929    #[doc = ""]
33930    #[doc = "ID: 12915"]
33931    OPEN_DRONE_ID_MESSAGE_PACK(OPEN_DRONE_ID_MESSAGE_PACK_DATA),
33932    #[doc = "Data for filling the OpenDroneID Operator ID message, which contains the CAA (Civil Aviation Authority) issued operator ID."]
33933    #[doc = ""]
33934    #[doc = "ID: 12905"]
33935    OPEN_DRONE_ID_OPERATOR_ID(OPEN_DRONE_ID_OPERATOR_ID_DATA),
33936    #[doc = "Data for filling the OpenDroneID Self ID message. The Self ID Message is an opportunity for the operator to (optionally) declare their identity and purpose of the flight. This message can provide additional information that could reduce the threat profile of a UA (Unmanned Aircraft) flying in a particular area or manner. This message can also be used to provide optional additional clarification in an emergency/remote ID system failure situation."]
33937    #[doc = ""]
33938    #[doc = "ID: 12903"]
33939    OPEN_DRONE_ID_SELF_ID(OPEN_DRONE_ID_SELF_ID_DATA),
33940    #[doc = "Data for filling the OpenDroneID System message. The System Message contains general system information including the operator location/altitude and possible aircraft group and/or category/class information."]
33941    #[doc = ""]
33942    #[doc = "ID: 12904"]
33943    OPEN_DRONE_ID_SYSTEM(OPEN_DRONE_ID_SYSTEM_DATA),
33944    #[doc = "Update the data in the OPEN_DRONE_ID_SYSTEM message with new location information. This can be sent to update the location information for the operator when no other information in the SYSTEM message has changed. This message allows for efficient operation on radio links which have limited uplink bandwidth while meeting requirements for update frequency of the operator location."]
33945    #[doc = ""]
33946    #[doc = "ID: 12919"]
33947    OPEN_DRONE_ID_SYSTEM_UPDATE(OPEN_DRONE_ID_SYSTEM_UPDATE_DATA),
33948    #[doc = "Optical flow from a flow sensor (e.g. optical mouse sensor)."]
33949    #[doc = ""]
33950    #[doc = "ID: 100"]
33951    OPTICAL_FLOW(OPTICAL_FLOW_DATA),
33952    #[doc = "Optical flow from an angular rate flow sensor (e.g. PX4FLOW or mouse sensor)."]
33953    #[doc = ""]
33954    #[doc = "ID: 106"]
33955    OPTICAL_FLOW_RAD(OPTICAL_FLOW_RAD_DATA),
33956    #[doc = "Vehicle status report that is sent out while orbit execution is in progress (see MAV_CMD_DO_ORBIT)."]
33957    #[doc = ""]
33958    #[doc = "ID: 360"]
33959    ORBIT_EXECUTION_STATUS(ORBIT_EXECUTION_STATUS_DATA),
33960    #[doc = "Response from a PARAM_EXT_SET message."]
33961    #[doc = ""]
33962    #[doc = "ID: 324"]
33963    PARAM_EXT_ACK(PARAM_EXT_ACK_DATA),
33964    #[doc = "Request all parameters of this component. All parameters should be emitted in response as PARAM_EXT_VALUE."]
33965    #[doc = ""]
33966    #[doc = "ID: 321"]
33967    PARAM_EXT_REQUEST_LIST(PARAM_EXT_REQUEST_LIST_DATA),
33968    #[doc = "Request to read the value of a parameter with either the param_id string id or param_index. PARAM_EXT_VALUE should be emitted in response."]
33969    #[doc = ""]
33970    #[doc = "ID: 320"]
33971    PARAM_EXT_REQUEST_READ(PARAM_EXT_REQUEST_READ_DATA),
33972    #[doc = "Set a parameter value. In order to deal with message loss (and retransmission of PARAM_EXT_SET), when setting a parameter value and the new value is the same as the current value, you will immediately get a PARAM_ACK_ACCEPTED response. If the current state is PARAM_ACK_IN_PROGRESS, you will accordingly receive a PARAM_ACK_IN_PROGRESS in response."]
33973    #[doc = ""]
33974    #[doc = "ID: 323"]
33975    PARAM_EXT_SET(PARAM_EXT_SET_DATA),
33976    #[doc = "Emit the value of a parameter. The inclusion of param_count and param_index in the message allows the recipient to keep track of received parameters and allows them to re-request missing parameters after a loss or timeout."]
33977    #[doc = ""]
33978    #[doc = "ID: 322"]
33979    PARAM_EXT_VALUE(PARAM_EXT_VALUE_DATA),
33980    #[doc = "Bind a RC channel to a parameter. The parameter should change according to the RC channel value."]
33981    #[doc = ""]
33982    #[doc = "ID: 50"]
33983    PARAM_MAP_RC(PARAM_MAP_RC_DATA),
33984    #[doc = "Request all parameters of this component. After this request, all parameters are emitted. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
33985    #[doc = ""]
33986    #[doc = "ID: 21"]
33987    PARAM_REQUEST_LIST(PARAM_REQUEST_LIST_DATA),
33988    #[doc = "value[float]. This allows to send a parameter to any other component (such as the GCS) without the need of previous knowledge of possible parameter names. Thus the same GCS can store different parameters for different autopilots. See also <https://mavlink.io/en/services/parameter.html> for a full documentation of QGroundControl and IMU code."]
33989    #[doc = ""]
33990    #[doc = "ID: 20"]
33991    PARAM_REQUEST_READ(PARAM_REQUEST_READ_DATA),
33992    #[doc = "Set a parameter value (write new value to permanent storage).         The receiving component should acknowledge the new parameter value by broadcasting a PARAM_VALUE message (broadcasting ensures that multiple GCS all have an up-to-date list of all parameters). If the sending GCS did not receive a PARAM_VALUE within its timeout time, it should re-send the PARAM_SET message. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
33993    #[doc = ""]
33994    #[doc = "ID: 23"]
33995    PARAM_SET(PARAM_SET_DATA),
33996    #[doc = "Emit the value of a onboard parameter. The inclusion of param_count and param_index in the message allows the recipient to keep track of received parameters and allows him to re-request missing parameters after a loss or timeout. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
33997    #[doc = ""]
33998    #[doc = "ID: 22"]
33999    PARAM_VALUE(PARAM_VALUE_DATA),
34000    #[doc = "A ping message either requesting or responding to a ping. This allows to measure the system latencies, including serial port, radio modem and UDP connections. The ping microservice is documented at <https://mavlink.io/en/services/ping.html>."]
34001    #[doc = ""]
34002    #[doc = "ID: 4"]
34003    #[deprecated = "To be removed / merged with TIMESYNC. See `TIMESYNC` (Deprecated since 2011-08)"]
34004    PING(PING_DATA),
34005    #[doc = "Control vehicle tone generation (buzzer)."]
34006    #[doc = ""]
34007    #[doc = "ID: 258"]
34008    #[deprecated = "New version explicitly defines format. More interoperable. See `PLAY_TUNE_V2` (Deprecated since 2019-10)"]
34009    PLAY_TUNE(PLAY_TUNE_DATA),
34010    #[doc = "Play vehicle tone/tune (buzzer). Supersedes message PLAY_TUNE."]
34011    #[doc = ""]
34012    #[doc = "ID: 400"]
34013    PLAY_TUNE_V2(PLAY_TUNE_V2_DATA),
34014    #[doc = "Reports the current commanded vehicle position, velocity, and acceleration as specified by the autopilot. This should match the commands sent in SET_POSITION_TARGET_GLOBAL_INT if the vehicle is being controlled this way."]
34015    #[doc = ""]
34016    #[doc = "ID: 87"]
34017    POSITION_TARGET_GLOBAL_INT(POSITION_TARGET_GLOBAL_INT_DATA),
34018    #[doc = "Reports the current commanded vehicle position, velocity, and acceleration as specified by the autopilot. This should match the commands sent in SET_POSITION_TARGET_LOCAL_NED if the vehicle is being controlled this way."]
34019    #[doc = ""]
34020    #[doc = "ID: 85"]
34021    POSITION_TARGET_LOCAL_NED(POSITION_TARGET_LOCAL_NED_DATA),
34022    #[doc = "Power supply status."]
34023    #[doc = ""]
34024    #[doc = "ID: 125"]
34025    POWER_STATUS(POWER_STATUS_DATA),
34026    #[doc = "Version and capability of protocol version. This message can be requested with MAV_CMD_REQUEST_MESSAGE and is used as part of the handshaking to establish which MAVLink version should be used on the network. Every node should respond to a request for PROTOCOL_VERSION to enable the handshaking. Library implementers should consider adding this into the default decoding state machine to allow the protocol core to respond directly."]
34027    #[doc = ""]
34028    #[doc = "ID: 300"]
34029    PROTOCOL_VERSION(PROTOCOL_VERSION_DATA),
34030    #[doc = "Status generated by radio and injected into MAVLink stream."]
34031    #[doc = ""]
34032    #[doc = "ID: 109"]
34033    RADIO_STATUS(RADIO_STATUS_DATA),
34034    #[doc = "The RAW IMU readings for a 9DOF sensor, which is identified by the id (default IMU1). This message should always contain the true raw values without any scaling to allow data capture and system debugging."]
34035    #[doc = ""]
34036    #[doc = "ID: 27"]
34037    RAW_IMU(RAW_IMU_DATA),
34038    #[doc = "The RAW pressure readings for the typical setup of one absolute pressure and one differential pressure sensor. The sensor values should be the raw, UNSCALED ADC values."]
34039    #[doc = ""]
34040    #[doc = "ID: 28"]
34041    RAW_PRESSURE(RAW_PRESSURE_DATA),
34042    #[doc = "RPM sensor data message."]
34043    #[doc = ""]
34044    #[doc = "ID: 339"]
34045    RAW_RPM(RAW_RPM_DATA),
34046    #[doc = "The PPM values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%.  A value of UINT16_MAX implies the channel is unused. Individual receivers/transmitters might violate this specification."]
34047    #[doc = ""]
34048    #[doc = "ID: 65"]
34049    RC_CHANNELS(RC_CHANNELS_DATA),
34050    #[doc = "The RAW values of the RC channels sent to the MAV to override info received from the RC radio. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. Individual receivers/transmitters might violate this specification.  Note carefully the semantic differences between the first 8 channels and the subsequent channels."]
34051    #[doc = ""]
34052    #[doc = "ID: 70"]
34053    RC_CHANNELS_OVERRIDE(RC_CHANNELS_OVERRIDE_DATA),
34054    #[doc = "The RAW values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. A value of UINT16_MAX implies the channel is unused. Individual receivers/transmitters might violate this specification."]
34055    #[doc = ""]
34056    #[doc = "ID: 35"]
34057    RC_CHANNELS_RAW(RC_CHANNELS_RAW_DATA),
34058    #[doc = "The scaled values of the RC channels received: (-100%) -10000, (0%) 0, (100%) 10000. Channels that are inactive should be set to INT16_MAX."]
34059    #[doc = ""]
34060    #[doc = "ID: 34"]
34061    RC_CHANNELS_SCALED(RC_CHANNELS_SCALED_DATA),
34062    #[doc = "Request a data stream."]
34063    #[doc = ""]
34064    #[doc = "ID: 66"]
34065    #[deprecated = " See `MAV_CMD_SET_MESSAGE_INTERVAL ` (Deprecated since 2015-08)"]
34066    REQUEST_DATA_STREAM(REQUEST_DATA_STREAM_DATA),
34067    #[doc = "Request one or more events to be (re-)sent. If first_sequence==last_sequence, only a single event is requested. Note that first_sequence can be larger than last_sequence (because the sequence number can wrap). Each sequence will trigger an EVENT or EVENT_ERROR response."]
34068    #[doc = ""]
34069    #[doc = "ID: 412"]
34070    REQUEST_EVENT(REQUEST_EVENT_DATA),
34071    #[doc = "The autopilot is requesting a resource (file, binary, other type of data)."]
34072    #[doc = ""]
34073    #[doc = "ID: 142"]
34074    RESOURCE_REQUEST(RESOURCE_REQUEST_DATA),
34075    #[doc = "Response to a REQUEST_EVENT in case of an error (e.g. the event is not available anymore)."]
34076    #[doc = ""]
34077    #[doc = "ID: 413"]
34078    RESPONSE_EVENT_ERROR(RESPONSE_EVENT_ERROR_DATA),
34079    #[doc = "Read out the safety zone the MAV currently assumes."]
34080    #[doc = ""]
34081    #[doc = "ID: 55"]
34082    SAFETY_ALLOWED_AREA(SAFETY_ALLOWED_AREA_DATA),
34083    #[doc = "Set a safety zone (volume), which is defined by two corners of a cube. This message can be used to tell the MAV which setpoints/waypoints to accept and which to reject. Safety areas are often enforced by national or competition regulations."]
34084    #[doc = ""]
34085    #[doc = "ID: 54"]
34086    SAFETY_SET_ALLOWED_AREA(SAFETY_SET_ALLOWED_AREA_DATA),
34087    #[doc = "Status of the SatCom link."]
34088    #[doc = ""]
34089    #[doc = "ID: 8015"]
34090    SATCOM_LINK_STATUS(SATCOM_LINK_STATUS_DATA),
34091    #[doc = "The RAW IMU readings for the usual 9DOF sensor setup. This message should contain the scaled values to the described units."]
34092    #[doc = ""]
34093    #[doc = "ID: 26"]
34094    SCALED_IMU(SCALED_IMU_DATA),
34095    #[doc = "The RAW IMU readings for secondary 9DOF sensor setup. This message should contain the scaled values to the described units."]
34096    #[doc = ""]
34097    #[doc = "ID: 116"]
34098    SCALED_IMU2(SCALED_IMU2_DATA),
34099    #[doc = "The RAW IMU readings for 3rd 9DOF sensor setup. This message should contain the scaled values to the described units."]
34100    #[doc = ""]
34101    #[doc = "ID: 129"]
34102    SCALED_IMU3(SCALED_IMU3_DATA),
34103    #[doc = "The pressure readings for the typical setup of one absolute and differential pressure sensor. The units are as specified in each field."]
34104    #[doc = ""]
34105    #[doc = "ID: 29"]
34106    SCALED_PRESSURE(SCALED_PRESSURE_DATA),
34107    #[doc = "Barometer readings for 2nd barometer."]
34108    #[doc = ""]
34109    #[doc = "ID: 137"]
34110    SCALED_PRESSURE2(SCALED_PRESSURE2_DATA),
34111    #[doc = "Barometer readings for 3rd barometer."]
34112    #[doc = ""]
34113    #[doc = "ID: 143"]
34114    SCALED_PRESSURE3(SCALED_PRESSURE3_DATA),
34115    #[doc = "Monitoring of sensorpod status."]
34116    #[doc = ""]
34117    #[doc = "ID: 8012"]
34118    SENSORPOD_STATUS(SENSORPOD_STATUS_DATA),
34119    #[doc = "Calibrated airflow angle measurements."]
34120    #[doc = ""]
34121    #[doc = "ID: 8016"]
34122    SENSOR_AIRFLOW_ANGLES(SENSOR_AIRFLOW_ANGLES_DATA),
34123    #[doc = "Atmospheric sensors (temperature, humidity, ...)."]
34124    #[doc = ""]
34125    #[doc = "ID: 8009"]
34126    SENS_ATMOS(SENS_ATMOS_DATA),
34127    #[doc = "Battery pack monitoring data for Li-Ion batteries."]
34128    #[doc = ""]
34129    #[doc = "ID: 8010"]
34130    SENS_BATMON(SENS_BATMON_DATA),
34131    #[doc = "Maximum Power Point Tracker (MPPT) sensor data for solar module power performance tracking."]
34132    #[doc = ""]
34133    #[doc = "ID: 8003"]
34134    SENS_MPPT(SENS_MPPT_DATA),
34135    #[doc = "Voltage and current sensor data."]
34136    #[doc = ""]
34137    #[doc = "ID: 8002"]
34138    SENS_POWER(SENS_POWER_DATA),
34139    #[doc = "Monitoring of power board status."]
34140    #[doc = ""]
34141    #[doc = "ID: 8013"]
34142    SENS_POWER_BOARD(SENS_POWER_BOARD_DATA),
34143    #[doc = "Control a serial port. This can be used for raw access to an onboard serial peripheral such as a GPS or telemetry radio. It is designed to make it possible to update the devices firmware via MAVLink messages or change the devices settings. A message with zero bytes can be used to change just the baudrate."]
34144    #[doc = ""]
34145    #[doc = "ID: 126"]
34146    SERIAL_CONTROL(SERIAL_CONTROL_DATA),
34147    #[doc = "Superseded by ACTUATOR_OUTPUT_STATUS. The RAW values of the servo outputs (for RC input from the remote, use the RC_CHANNELS messages). The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%."]
34148    #[doc = ""]
34149    #[doc = "ID: 36"]
34150    SERVO_OUTPUT_RAW(SERVO_OUTPUT_RAW_DATA),
34151    #[doc = "Setup a MAVLink2 signing key. If called with secret_key of all zero and zero initial_timestamp will disable signing."]
34152    #[doc = ""]
34153    #[doc = "ID: 256"]
34154    SETUP_SIGNING(SETUP_SIGNING_DATA),
34155    #[doc = "Set the vehicle attitude and body angular rates."]
34156    #[doc = ""]
34157    #[doc = "ID: 139"]
34158    SET_ACTUATOR_CONTROL_TARGET(SET_ACTUATOR_CONTROL_TARGET_DATA),
34159    #[doc = "Sets a desired vehicle attitude. Used by an external controller to command the vehicle (manual controller or other system)."]
34160    #[doc = ""]
34161    #[doc = "ID: 82"]
34162    SET_ATTITUDE_TARGET(SET_ATTITUDE_TARGET_DATA),
34163    #[doc = "Sets the GPS coordinates of the vehicle local origin (0,0,0) position. Vehicle should emit GPS_GLOBAL_ORIGIN irrespective of whether the origin is changed. This enables transform between the local coordinate frame and the global (GPS) coordinate frame, which may be necessary when (for example) indoor and outdoor settings are connected and the MAV should move from in- to outdoor."]
34164    #[doc = ""]
34165    #[doc = "ID: 48"]
34166    #[deprecated = " See `MAV_CMD_SET_GLOBAL_ORIGIN` (Deprecated since 2025-04)"]
34167    SET_GPS_GLOBAL_ORIGIN(SET_GPS_GLOBAL_ORIGIN_DATA),
34168    #[doc = "Sets the home position. \tThe home position is the default position that the system will return to and land on.         The position is set automatically by the system during the takeoff (and may also be set using this message).         The global and local positions encode the position in the respective coordinate frames, while the q parameter encodes the orientation of the surface.         Under normal conditions it describes the heading and terrain slope, which can be used by the aircraft to adjust the approach.         The approach 3D vector describes the point to which the system should fly in normal flight mode and then perform a landing sequence along the vector.         Note: the current home position may be emitted in a HOME_POSITION message on request (using MAV_CMD_REQUEST_MESSAGE with param1=242)."]
34169    #[doc = ""]
34170    #[doc = "ID: 243"]
34171    #[deprecated = "The command protocol version (MAV_CMD_DO_SET_HOME) allows a GCS to detect when setting the home position has failed. See `MAV_CMD_DO_SET_HOME` (Deprecated since 2022-02)"]
34172    SET_HOME_POSITION(SET_HOME_POSITION_DATA),
34173    #[doc = "Set the system mode, as defined by enum MAV_MODE. There is no target component id as the mode is by definition for the overall aircraft, not only for one component."]
34174    #[doc = ""]
34175    #[doc = "ID: 11"]
34176    #[deprecated = "Use COMMAND_LONG with MAV_CMD_DO_SET_MODE instead. See `MAV_CMD_DO_SET_MODE` (Deprecated since 2015-12)"]
34177    SET_MODE(SET_MODE_DATA),
34178    #[doc = "Sets a desired vehicle position, velocity, and/or acceleration in a global coordinate system (WGS84). Used by an external controller to command the vehicle (manual controller or other system)."]
34179    #[doc = ""]
34180    #[doc = "ID: 86"]
34181    SET_POSITION_TARGET_GLOBAL_INT(SET_POSITION_TARGET_GLOBAL_INT_DATA),
34182    #[doc = "Sets a desired vehicle position in a local north-east-down coordinate frame. Used by an external controller to command the vehicle (manual controller or other system)."]
34183    #[doc = ""]
34184    #[doc = "ID: 84"]
34185    SET_POSITION_TARGET_LOCAL_NED(SET_POSITION_TARGET_LOCAL_NED_DATA),
34186    #[doc = "Status of simulation environment, if used."]
34187    #[doc = ""]
34188    #[doc = "ID: 108"]
34189    SIM_STATE(SIM_STATE_DATA),
34190    #[doc = "Smart Battery information (static/infrequent update). Use for updates from: smart battery to flight stack, flight stack to GCS. Use BATTERY_STATUS for the frequent battery updates."]
34191    #[doc = ""]
34192    #[doc = "ID: 370"]
34193    #[deprecated = "The BATTERY_INFO message is better aligned with UAVCAN messages, and in any case is useful even if a battery is not \"smart\". See `BATTERY_INFO` (Deprecated since 2024-02)"]
34194    SMART_BATTERY_INFO(SMART_BATTERY_INFO_DATA),
34195    #[doc = "Status text message. These messages are printed in yellow in the COMM console of QGroundControl. WARNING: They consume quite some bandwidth, so use only for important status and error messages. If implemented wisely, these messages are buffered on the MCU and sent only at a limited rate (e.g. 10 Hz)."]
34196    #[doc = ""]
34197    #[doc = "ID: 253"]
34198    STATUSTEXT(STATUSTEXT_DATA),
34199    #[doc = "Information about a storage medium. This message is sent in response to a request with MAV_CMD_REQUEST_MESSAGE and whenever the status of the storage changes (STORAGE_STATUS). Use MAV_CMD_REQUEST_MESSAGE.param2 to indicate the index/id of requested storage: 0 for all, 1 for first, 2 for second, etc."]
34200    #[doc = ""]
34201    #[doc = "ID: 261"]
34202    STORAGE_INFORMATION(STORAGE_INFORMATION_DATA),
34203    #[doc = "Tune formats supported by vehicle. This should be emitted as response to MAV_CMD_REQUEST_MESSAGE."]
34204    #[doc = ""]
34205    #[doc = "ID: 401"]
34206    SUPPORTED_TUNES(SUPPORTED_TUNES_DATA),
34207    #[doc = "The system time is the time of the master clock.         This can be emitted by flight controllers, onboard computers, or other components in the MAVLink network.         Components that are using a less reliable time source, such as a battery-backed real time clock, can choose to match their system clock to that of a SYSTEM_TYPE that indicates a more recent time.         This allows more broadly accurate date stamping of logs, and so on.         If precise time synchronization is needed then use TIMESYNC instead."]
34208    #[doc = ""]
34209    #[doc = "ID: 2"]
34210    SYSTEM_TIME(SYSTEM_TIME_DATA),
34211    #[doc = "The general system state. If the system is following the MAVLink standard, the system state is mainly defined by three orthogonal states/modes: The system mode, which is either LOCKED (motors shut down and locked), MANUAL (system under RC control), GUIDED (system with autonomous position control, position setpoint controlled manually) or AUTO (system guided by path/waypoint planner). The NAV_MODE defined the current flight state: LIFTOFF (often an open-loop maneuver), LANDING, WAYPOINTS or VECTOR. This represents the internal navigation state machine. The system status shows whether the system is currently active or not and if an emergency occurred. During the CRITICAL and EMERGENCY states the MAV is still considered to be active, but should start emergency procedures autonomously. After a failure occurred it should first move from active to critical to allow manual intervention and then move to emergency after a certain timeout."]
34212    #[doc = ""]
34213    #[doc = "ID: 1"]
34214    SYS_STATUS(SYS_STATUS_DATA),
34215    #[doc = "Request that the vehicle report terrain height at the given location (expected response is a TERRAIN_REPORT). Used by GCS to check if vehicle has all terrain data needed for a mission."]
34216    #[doc = ""]
34217    #[doc = "ID: 135"]
34218    TERRAIN_CHECK(TERRAIN_CHECK_DATA),
34219    #[doc = "Terrain data sent from GCS. The lat/lon and grid_spacing must be the same as a lat/lon from a TERRAIN_REQUEST. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
34220    #[doc = ""]
34221    #[doc = "ID: 134"]
34222    TERRAIN_DATA(TERRAIN_DATA_DATA),
34223    #[doc = "Streamed from drone to report progress of terrain map download (initiated by TERRAIN_REQUEST), or sent as a response to a TERRAIN_CHECK request. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
34224    #[doc = ""]
34225    #[doc = "ID: 136"]
34226    TERRAIN_REPORT(TERRAIN_REPORT_DATA),
34227    #[doc = "Request for terrain data and terrain status. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
34228    #[doc = ""]
34229    #[doc = "ID: 133"]
34230    TERRAIN_REQUEST(TERRAIN_REQUEST_DATA),
34231    #[doc = "Time synchronization message.         The message is used for both timesync requests and responses.         The request is sent with `ts1=syncing component timestamp` and `tc1=0`, and may be broadcast or targeted to a specific system/component.         The response is sent with `ts1=syncing component timestamp` (mirror back unchanged), and `tc1=responding component timestamp`, with the `target_system` and `target_component` set to ids of the original request.         Systems can determine if they are receiving a request or response based on the value of `tc`.         If the response has `target_system==target_component==0` the remote system has not been updated to use the component IDs and cannot reliably timesync; the requestor may report an error.         Timestamps are UNIX Epoch time or time since system boot in nanoseconds (the timestamp format can be inferred by checking for the magnitude of the number; generally it doesn't matter as only the offset is used).         The message sequence is repeated numerous times with results being filtered/averaged to estimate the offset.         See also: <https://mavlink.io/en/services/timesync.html>."]
34232    #[doc = ""]
34233    #[doc = "ID: 111"]
34234    TIMESYNC(TIMESYNC_DATA),
34235    #[doc = "Time/duration estimates for various events and actions given the current vehicle state and position."]
34236    #[doc = ""]
34237    #[doc = "ID: 380"]
34238    TIME_ESTIMATE_TO_TARGET(TIME_ESTIMATE_TO_TARGET_DATA),
34239    #[doc = "Describe a trajectory using an array of up-to 5 bezier control points in the local frame (MAV_FRAME_LOCAL_NED)."]
34240    #[doc = ""]
34241    #[doc = "ID: 333"]
34242    TRAJECTORY_REPRESENTATION_BEZIER(TRAJECTORY_REPRESENTATION_BEZIER_DATA),
34243    #[doc = "Describe a trajectory using an array of up-to 5 waypoints in the local frame (MAV_FRAME_LOCAL_NED)."]
34244    #[doc = ""]
34245    #[doc = "ID: 332"]
34246    TRAJECTORY_REPRESENTATION_WAYPOINTS(TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA),
34247    #[doc = "Message for transporting \"arbitrary\" variable-length data from one component to another (broadcast is not forbidden, but discouraged). The encoding of the data is usually extension specific, i.e. determined by the source, and is usually not documented as part of the MAVLink specification."]
34248    #[doc = ""]
34249    #[doc = "ID: 385"]
34250    TUNNEL(TUNNEL_DATA),
34251    #[doc = "General information describing a particular UAVCAN node. Please refer to the definition of the UAVCAN service \"uavcan.protocol.GetNodeInfo\" for the background information. This message should be emitted by the system whenever a new node appears online, or an existing node reboots. Additionally, it can be emitted upon request from the other end of the MAVLink channel (see MAV_CMD_UAVCAN_GET_NODE_INFO). It is also not prohibited to emit this message unconditionally at a low frequency. The UAVCAN specification is available at <http://uavcan.org>."]
34252    #[doc = ""]
34253    #[doc = "ID: 311"]
34254    UAVCAN_NODE_INFO(UAVCAN_NODE_INFO_DATA),
34255    #[doc = "General status information of an UAVCAN node. Please refer to the definition of the UAVCAN message \"uavcan.protocol.NodeStatus\" for the background information. The UAVCAN specification is available at <http://uavcan.org>."]
34256    #[doc = ""]
34257    #[doc = "ID: 310"]
34258    UAVCAN_NODE_STATUS(UAVCAN_NODE_STATUS_DATA),
34259    #[doc = "The global position resulting from GPS and sensor fusion."]
34260    #[doc = ""]
34261    #[doc = "ID: 340"]
34262    UTM_GLOBAL_POSITION(UTM_GLOBAL_POSITION_DATA),
34263    #[doc = "Message implementing parts of the V2 payload specs in V1 frames for transitional support."]
34264    #[doc = ""]
34265    #[doc = "ID: 248"]
34266    V2_EXTENSION(V2_EXTENSION_DATA),
34267    #[doc = "Metrics typically displayed on a HUD for fixed wing aircraft."]
34268    #[doc = ""]
34269    #[doc = "ID: 74"]
34270    VFR_HUD(VFR_HUD_DATA),
34271    #[doc = "Vibration levels and accelerometer clipping."]
34272    #[doc = ""]
34273    #[doc = "ID: 241"]
34274    VIBRATION(VIBRATION_DATA),
34275    #[doc = "Global position estimate from a Vicon motion system source."]
34276    #[doc = ""]
34277    #[doc = "ID: 104"]
34278    VICON_POSITION_ESTIMATE(VICON_POSITION_ESTIMATE_DATA),
34279    #[doc = "Information about video stream. It may be requested using MAV_CMD_REQUEST_MESSAGE, where param2 indicates the video stream id: 0 for all streams, 1 for first, 2 for second, etc."]
34280    #[doc = ""]
34281    #[doc = "ID: 269"]
34282    VIDEO_STREAM_INFORMATION(VIDEO_STREAM_INFORMATION_DATA),
34283    #[doc = "Information about the status of a video stream. It may be requested using MAV_CMD_REQUEST_MESSAGE."]
34284    #[doc = ""]
34285    #[doc = "ID: 270"]
34286    VIDEO_STREAM_STATUS(VIDEO_STREAM_STATUS_DATA),
34287    #[doc = "Local position/attitude estimate from a vision source."]
34288    #[doc = ""]
34289    #[doc = "ID: 102"]
34290    VISION_POSITION_ESTIMATE(VISION_POSITION_ESTIMATE_DATA),
34291    #[doc = "Speed estimate from a vision source."]
34292    #[doc = ""]
34293    #[doc = "ID: 103"]
34294    VISION_SPEED_ESTIMATE(VISION_SPEED_ESTIMATE_DATA),
34295    #[doc = "Cumulative distance traveled for each reported wheel."]
34296    #[doc = ""]
34297    #[doc = "ID: 9000"]
34298    WHEEL_DISTANCE(WHEEL_DISTANCE_DATA),
34299    #[doc = "Configure WiFi AP SSID, password, and mode. This message is re-emitted as an acknowledgement by the AP. The message may also be explicitly requested using MAV_CMD_REQUEST_MESSAGE."]
34300    #[doc = ""]
34301    #[doc = "ID: 299"]
34302    WIFI_CONFIG_AP(WIFI_CONFIG_AP_DATA),
34303    #[doc = "Winch status."]
34304    #[doc = ""]
34305    #[doc = "ID: 9005"]
34306    WINCH_STATUS(WINCH_STATUS_DATA),
34307    #[doc = "Wind estimate from vehicle. Note that despite the name, this message does not actually contain any covariances but instead variability and accuracy fields in terms of standard deviation (1-STD)."]
34308    #[doc = ""]
34309    #[doc = "ID: 231"]
34310    WIND_COV(WIND_COV_DATA),
34311}
34312impl MavMessage {
34313    pub const fn all_ids() -> &'static [u32] {
34314        &[
34315            0u32, 1u32, 2u32, 4u32, 5u32, 6u32, 7u32, 8u32, 11u32, 20u32, 21u32, 22u32, 23u32,
34316            24u32, 25u32, 26u32, 27u32, 28u32, 29u32, 30u32, 31u32, 32u32, 33u32, 34u32, 35u32,
34317            36u32, 37u32, 38u32, 39u32, 40u32, 41u32, 42u32, 43u32, 44u32, 45u32, 46u32, 47u32,
34318            48u32, 49u32, 50u32, 51u32, 54u32, 55u32, 61u32, 62u32, 63u32, 64u32, 65u32, 66u32,
34319            67u32, 69u32, 70u32, 73u32, 74u32, 75u32, 76u32, 77u32, 80u32, 81u32, 82u32, 83u32,
34320            84u32, 85u32, 86u32, 87u32, 89u32, 90u32, 91u32, 92u32, 93u32, 100u32, 101u32, 102u32,
34321            103u32, 104u32, 105u32, 106u32, 107u32, 108u32, 109u32, 110u32, 111u32, 112u32, 113u32,
34322            114u32, 115u32, 116u32, 117u32, 118u32, 119u32, 120u32, 121u32, 122u32, 123u32, 124u32,
34323            125u32, 126u32, 127u32, 128u32, 129u32, 130u32, 131u32, 132u32, 133u32, 134u32, 135u32,
34324            136u32, 137u32, 138u32, 139u32, 140u32, 141u32, 142u32, 143u32, 144u32, 146u32, 147u32,
34325            148u32, 149u32, 162u32, 192u32, 223u32, 224u32, 225u32, 230u32, 231u32, 232u32, 233u32,
34326            234u32, 235u32, 241u32, 242u32, 243u32, 244u32, 245u32, 246u32, 247u32, 248u32, 249u32,
34327            250u32, 251u32, 252u32, 253u32, 254u32, 256u32, 257u32, 258u32, 259u32, 260u32, 261u32,
34328            262u32, 263u32, 264u32, 265u32, 266u32, 267u32, 268u32, 269u32, 270u32, 271u32, 275u32,
34329            276u32, 277u32, 280u32, 281u32, 282u32, 283u32, 284u32, 285u32, 286u32, 287u32, 288u32,
34330            290u32, 291u32, 299u32, 300u32, 301u32, 310u32, 311u32, 320u32, 321u32, 322u32, 323u32,
34331            324u32, 330u32, 331u32, 332u32, 333u32, 334u32, 335u32, 336u32, 339u32, 340u32, 350u32,
34332            360u32, 370u32, 371u32, 372u32, 373u32, 375u32, 380u32, 385u32, 386u32, 387u32, 388u32,
34333            390u32, 395u32, 396u32, 397u32, 400u32, 401u32, 410u32, 411u32, 412u32, 413u32, 435u32,
34334            436u32, 437u32, 440u32, 8002u32, 8003u32, 8004u32, 8005u32, 8006u32, 8007u32, 8008u32,
34335            8009u32, 8010u32, 8011u32, 8012u32, 8013u32, 8014u32, 8015u32, 8016u32, 9000u32,
34336            9005u32, 12900u32, 12901u32, 12902u32, 12903u32, 12904u32, 12905u32, 12915u32,
34337            12918u32, 12919u32, 12920u32,
34338        ]
34339    }
34340}
34341impl Message for MavMessage {
34342    fn parse(
34343        version: MavlinkVersion,
34344        id: u32,
34345        payload: &[u8],
34346    ) -> Result<Self, ::mavlink_core::error::ParserError> {
34347        match id {
34348            ACTUATOR_CONTROL_TARGET_DATA::ID => {
34349                ACTUATOR_CONTROL_TARGET_DATA::deser(version, payload)
34350                    .map(Self::ACTUATOR_CONTROL_TARGET)
34351            }
34352            ACTUATOR_OUTPUT_STATUS_DATA::ID => ACTUATOR_OUTPUT_STATUS_DATA::deser(version, payload)
34353                .map(Self::ACTUATOR_OUTPUT_STATUS),
34354            ADSB_VEHICLE_DATA::ID => {
34355                ADSB_VEHICLE_DATA::deser(version, payload).map(Self::ADSB_VEHICLE)
34356            }
34357            AIS_VESSEL_DATA::ID => AIS_VESSEL_DATA::deser(version, payload).map(Self::AIS_VESSEL),
34358            ALTITUDE_DATA::ID => ALTITUDE_DATA::deser(version, payload).map(Self::ALTITUDE),
34359            ASLCTRL_DATA_DATA::ID => {
34360                ASLCTRL_DATA_DATA::deser(version, payload).map(Self::ASLCTRL_DATA)
34361            }
34362            ASLCTRL_DEBUG_DATA::ID => {
34363                ASLCTRL_DEBUG_DATA::deser(version, payload).map(Self::ASLCTRL_DEBUG)
34364            }
34365            ASLUAV_STATUS_DATA::ID => {
34366                ASLUAV_STATUS_DATA::deser(version, payload).map(Self::ASLUAV_STATUS)
34367            }
34368            ASL_OBCTRL_DATA::ID => ASL_OBCTRL_DATA::deser(version, payload).map(Self::ASL_OBCTRL),
34369            ATTITUDE_DATA::ID => ATTITUDE_DATA::deser(version, payload).map(Self::ATTITUDE),
34370            ATTITUDE_QUATERNION_DATA::ID => {
34371                ATTITUDE_QUATERNION_DATA::deser(version, payload).map(Self::ATTITUDE_QUATERNION)
34372            }
34373            ATTITUDE_QUATERNION_COV_DATA::ID => {
34374                ATTITUDE_QUATERNION_COV_DATA::deser(version, payload)
34375                    .map(Self::ATTITUDE_QUATERNION_COV)
34376            }
34377            ATTITUDE_TARGET_DATA::ID => {
34378                ATTITUDE_TARGET_DATA::deser(version, payload).map(Self::ATTITUDE_TARGET)
34379            }
34380            ATT_POS_MOCAP_DATA::ID => {
34381                ATT_POS_MOCAP_DATA::deser(version, payload).map(Self::ATT_POS_MOCAP)
34382            }
34383            AUTH_KEY_DATA::ID => AUTH_KEY_DATA::deser(version, payload).map(Self::AUTH_KEY),
34384            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID => {
34385                AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::deser(version, payload)
34386                    .map(Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE)
34387            }
34388            AUTOPILOT_VERSION_DATA::ID => {
34389                AUTOPILOT_VERSION_DATA::deser(version, payload).map(Self::AUTOPILOT_VERSION)
34390            }
34391            AVAILABLE_MODES_DATA::ID => {
34392                AVAILABLE_MODES_DATA::deser(version, payload).map(Self::AVAILABLE_MODES)
34393            }
34394            AVAILABLE_MODES_MONITOR_DATA::ID => {
34395                AVAILABLE_MODES_MONITOR_DATA::deser(version, payload)
34396                    .map(Self::AVAILABLE_MODES_MONITOR)
34397            }
34398            BATTERY_INFO_DATA::ID => {
34399                BATTERY_INFO_DATA::deser(version, payload).map(Self::BATTERY_INFO)
34400            }
34401            BATTERY_STATUS_DATA::ID => {
34402                BATTERY_STATUS_DATA::deser(version, payload).map(Self::BATTERY_STATUS)
34403            }
34404            BUTTON_CHANGE_DATA::ID => {
34405                BUTTON_CHANGE_DATA::deser(version, payload).map(Self::BUTTON_CHANGE)
34406            }
34407            CAMERA_CAPTURE_STATUS_DATA::ID => {
34408                CAMERA_CAPTURE_STATUS_DATA::deser(version, payload).map(Self::CAMERA_CAPTURE_STATUS)
34409            }
34410            CAMERA_FOV_STATUS_DATA::ID => {
34411                CAMERA_FOV_STATUS_DATA::deser(version, payload).map(Self::CAMERA_FOV_STATUS)
34412            }
34413            CAMERA_IMAGE_CAPTURED_DATA::ID => {
34414                CAMERA_IMAGE_CAPTURED_DATA::deser(version, payload).map(Self::CAMERA_IMAGE_CAPTURED)
34415            }
34416            CAMERA_INFORMATION_DATA::ID => {
34417                CAMERA_INFORMATION_DATA::deser(version, payload).map(Self::CAMERA_INFORMATION)
34418            }
34419            CAMERA_SETTINGS_DATA::ID => {
34420                CAMERA_SETTINGS_DATA::deser(version, payload).map(Self::CAMERA_SETTINGS)
34421            }
34422            CAMERA_THERMAL_RANGE_DATA::ID => {
34423                CAMERA_THERMAL_RANGE_DATA::deser(version, payload).map(Self::CAMERA_THERMAL_RANGE)
34424            }
34425            CAMERA_TRACKING_GEO_STATUS_DATA::ID => {
34426                CAMERA_TRACKING_GEO_STATUS_DATA::deser(version, payload)
34427                    .map(Self::CAMERA_TRACKING_GEO_STATUS)
34428            }
34429            CAMERA_TRACKING_IMAGE_STATUS_DATA::ID => {
34430                CAMERA_TRACKING_IMAGE_STATUS_DATA::deser(version, payload)
34431                    .map(Self::CAMERA_TRACKING_IMAGE_STATUS)
34432            }
34433            CAMERA_TRIGGER_DATA::ID => {
34434                CAMERA_TRIGGER_DATA::deser(version, payload).map(Self::CAMERA_TRIGGER)
34435            }
34436            CANFD_FRAME_DATA::ID => {
34437                CANFD_FRAME_DATA::deser(version, payload).map(Self::CANFD_FRAME)
34438            }
34439            CAN_FILTER_MODIFY_DATA::ID => {
34440                CAN_FILTER_MODIFY_DATA::deser(version, payload).map(Self::CAN_FILTER_MODIFY)
34441            }
34442            CAN_FRAME_DATA::ID => CAN_FRAME_DATA::deser(version, payload).map(Self::CAN_FRAME),
34443            CELLULAR_CONFIG_DATA::ID => {
34444                CELLULAR_CONFIG_DATA::deser(version, payload).map(Self::CELLULAR_CONFIG)
34445            }
34446            CELLULAR_STATUS_DATA::ID => {
34447                CELLULAR_STATUS_DATA::deser(version, payload).map(Self::CELLULAR_STATUS)
34448            }
34449            CHANGE_OPERATOR_CONTROL_DATA::ID => {
34450                CHANGE_OPERATOR_CONTROL_DATA::deser(version, payload)
34451                    .map(Self::CHANGE_OPERATOR_CONTROL)
34452            }
34453            CHANGE_OPERATOR_CONTROL_ACK_DATA::ID => {
34454                CHANGE_OPERATOR_CONTROL_ACK_DATA::deser(version, payload)
34455                    .map(Self::CHANGE_OPERATOR_CONTROL_ACK)
34456            }
34457            COLLISION_DATA::ID => COLLISION_DATA::deser(version, payload).map(Self::COLLISION),
34458            COMMAND_ACK_DATA::ID => {
34459                COMMAND_ACK_DATA::deser(version, payload).map(Self::COMMAND_ACK)
34460            }
34461            COMMAND_CANCEL_DATA::ID => {
34462                COMMAND_CANCEL_DATA::deser(version, payload).map(Self::COMMAND_CANCEL)
34463            }
34464            COMMAND_INT_DATA::ID => {
34465                COMMAND_INT_DATA::deser(version, payload).map(Self::COMMAND_INT)
34466            }
34467            COMMAND_INT_STAMPED_DATA::ID => {
34468                COMMAND_INT_STAMPED_DATA::deser(version, payload).map(Self::COMMAND_INT_STAMPED)
34469            }
34470            COMMAND_LONG_DATA::ID => {
34471                COMMAND_LONG_DATA::deser(version, payload).map(Self::COMMAND_LONG)
34472            }
34473            COMMAND_LONG_STAMPED_DATA::ID => {
34474                COMMAND_LONG_STAMPED_DATA::deser(version, payload).map(Self::COMMAND_LONG_STAMPED)
34475            }
34476            COMPONENT_INFORMATION_DATA::ID => {
34477                COMPONENT_INFORMATION_DATA::deser(version, payload).map(Self::COMPONENT_INFORMATION)
34478            }
34479            COMPONENT_INFORMATION_BASIC_DATA::ID => {
34480                COMPONENT_INFORMATION_BASIC_DATA::deser(version, payload)
34481                    .map(Self::COMPONENT_INFORMATION_BASIC)
34482            }
34483            COMPONENT_METADATA_DATA::ID => {
34484                COMPONENT_METADATA_DATA::deser(version, payload).map(Self::COMPONENT_METADATA)
34485            }
34486            CONTROL_SYSTEM_STATE_DATA::ID => {
34487                CONTROL_SYSTEM_STATE_DATA::deser(version, payload).map(Self::CONTROL_SYSTEM_STATE)
34488            }
34489            CURRENT_EVENT_SEQUENCE_DATA::ID => CURRENT_EVENT_SEQUENCE_DATA::deser(version, payload)
34490                .map(Self::CURRENT_EVENT_SEQUENCE),
34491            CURRENT_MODE_DATA::ID => {
34492                CURRENT_MODE_DATA::deser(version, payload).map(Self::CURRENT_MODE)
34493            }
34494            DATA_STREAM_DATA::ID => {
34495                DATA_STREAM_DATA::deser(version, payload).map(Self::DATA_STREAM)
34496            }
34497            DATA_TRANSMISSION_HANDSHAKE_DATA::ID => {
34498                DATA_TRANSMISSION_HANDSHAKE_DATA::deser(version, payload)
34499                    .map(Self::DATA_TRANSMISSION_HANDSHAKE)
34500            }
34501            DEBUG_DATA::ID => DEBUG_DATA::deser(version, payload).map(Self::DEBUG),
34502            DEBUG_FLOAT_ARRAY_DATA::ID => {
34503                DEBUG_FLOAT_ARRAY_DATA::deser(version, payload).map(Self::DEBUG_FLOAT_ARRAY)
34504            }
34505            DEBUG_VECT_DATA::ID => DEBUG_VECT_DATA::deser(version, payload).map(Self::DEBUG_VECT),
34506            DISTANCE_SENSOR_DATA::ID => {
34507                DISTANCE_SENSOR_DATA::deser(version, payload).map(Self::DISTANCE_SENSOR)
34508            }
34509            EFI_STATUS_DATA::ID => EFI_STATUS_DATA::deser(version, payload).map(Self::EFI_STATUS),
34510            EKF_EXT_DATA::ID => EKF_EXT_DATA::deser(version, payload).map(Self::EKF_EXT),
34511            ENCAPSULATED_DATA_DATA::ID => {
34512                ENCAPSULATED_DATA_DATA::deser(version, payload).map(Self::ENCAPSULATED_DATA)
34513            }
34514            ESC_INFO_DATA::ID => ESC_INFO_DATA::deser(version, payload).map(Self::ESC_INFO),
34515            ESC_STATUS_DATA::ID => ESC_STATUS_DATA::deser(version, payload).map(Self::ESC_STATUS),
34516            ESTIMATOR_STATUS_DATA::ID => {
34517                ESTIMATOR_STATUS_DATA::deser(version, payload).map(Self::ESTIMATOR_STATUS)
34518            }
34519            EVENT_DATA::ID => EVENT_DATA::deser(version, payload).map(Self::EVENT),
34520            EXTENDED_SYS_STATE_DATA::ID => {
34521                EXTENDED_SYS_STATE_DATA::deser(version, payload).map(Self::EXTENDED_SYS_STATE)
34522            }
34523            FENCE_STATUS_DATA::ID => {
34524                FENCE_STATUS_DATA::deser(version, payload).map(Self::FENCE_STATUS)
34525            }
34526            FILE_TRANSFER_PROTOCOL_DATA::ID => FILE_TRANSFER_PROTOCOL_DATA::deser(version, payload)
34527                .map(Self::FILE_TRANSFER_PROTOCOL),
34528            FLIGHT_INFORMATION_DATA::ID => {
34529                FLIGHT_INFORMATION_DATA::deser(version, payload).map(Self::FLIGHT_INFORMATION)
34530            }
34531            FOLLOW_TARGET_DATA::ID => {
34532                FOLLOW_TARGET_DATA::deser(version, payload).map(Self::FOLLOW_TARGET)
34533            }
34534            FUEL_STATUS_DATA::ID => {
34535                FUEL_STATUS_DATA::deser(version, payload).map(Self::FUEL_STATUS)
34536            }
34537            FW_SOARING_DATA_DATA::ID => {
34538                FW_SOARING_DATA_DATA::deser(version, payload).map(Self::FW_SOARING_DATA)
34539            }
34540            GENERATOR_STATUS_DATA::ID => {
34541                GENERATOR_STATUS_DATA::deser(version, payload).map(Self::GENERATOR_STATUS)
34542            }
34543            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID => {
34544                GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::deser(version, payload)
34545                    .map(Self::GIMBAL_DEVICE_ATTITUDE_STATUS)
34546            }
34547            GIMBAL_DEVICE_INFORMATION_DATA::ID => {
34548                GIMBAL_DEVICE_INFORMATION_DATA::deser(version, payload)
34549                    .map(Self::GIMBAL_DEVICE_INFORMATION)
34550            }
34551            GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID => {
34552                GIMBAL_DEVICE_SET_ATTITUDE_DATA::deser(version, payload)
34553                    .map(Self::GIMBAL_DEVICE_SET_ATTITUDE)
34554            }
34555            GIMBAL_MANAGER_INFORMATION_DATA::ID => {
34556                GIMBAL_MANAGER_INFORMATION_DATA::deser(version, payload)
34557                    .map(Self::GIMBAL_MANAGER_INFORMATION)
34558            }
34559            GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID => {
34560                GIMBAL_MANAGER_SET_ATTITUDE_DATA::deser(version, payload)
34561                    .map(Self::GIMBAL_MANAGER_SET_ATTITUDE)
34562            }
34563            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID => {
34564                GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::deser(version, payload)
34565                    .map(Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL)
34566            }
34567            GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID => {
34568                GIMBAL_MANAGER_SET_PITCHYAW_DATA::deser(version, payload)
34569                    .map(Self::GIMBAL_MANAGER_SET_PITCHYAW)
34570            }
34571            GIMBAL_MANAGER_STATUS_DATA::ID => {
34572                GIMBAL_MANAGER_STATUS_DATA::deser(version, payload).map(Self::GIMBAL_MANAGER_STATUS)
34573            }
34574            GLOBAL_POSITION_INT_DATA::ID => {
34575                GLOBAL_POSITION_INT_DATA::deser(version, payload).map(Self::GLOBAL_POSITION_INT)
34576            }
34577            GLOBAL_POSITION_INT_COV_DATA::ID => {
34578                GLOBAL_POSITION_INT_COV_DATA::deser(version, payload)
34579                    .map(Self::GLOBAL_POSITION_INT_COV)
34580            }
34581            GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID => {
34582                GLOBAL_VISION_POSITION_ESTIMATE_DATA::deser(version, payload)
34583                    .map(Self::GLOBAL_VISION_POSITION_ESTIMATE)
34584            }
34585            GPS2_RAW_DATA::ID => GPS2_RAW_DATA::deser(version, payload).map(Self::GPS2_RAW),
34586            GPS2_RTK_DATA::ID => GPS2_RTK_DATA::deser(version, payload).map(Self::GPS2_RTK),
34587            GPS_GLOBAL_ORIGIN_DATA::ID => {
34588                GPS_GLOBAL_ORIGIN_DATA::deser(version, payload).map(Self::GPS_GLOBAL_ORIGIN)
34589            }
34590            GPS_INJECT_DATA_DATA::ID => {
34591                GPS_INJECT_DATA_DATA::deser(version, payload).map(Self::GPS_INJECT_DATA)
34592            }
34593            GPS_INPUT_DATA::ID => GPS_INPUT_DATA::deser(version, payload).map(Self::GPS_INPUT),
34594            GPS_RAW_INT_DATA::ID => {
34595                GPS_RAW_INT_DATA::deser(version, payload).map(Self::GPS_RAW_INT)
34596            }
34597            GPS_RTCM_DATA_DATA::ID => {
34598                GPS_RTCM_DATA_DATA::deser(version, payload).map(Self::GPS_RTCM_DATA)
34599            }
34600            GPS_RTK_DATA::ID => GPS_RTK_DATA::deser(version, payload).map(Self::GPS_RTK),
34601            GPS_STATUS_DATA::ID => GPS_STATUS_DATA::deser(version, payload).map(Self::GPS_STATUS),
34602            GSM_LINK_STATUS_DATA::ID => {
34603                GSM_LINK_STATUS_DATA::deser(version, payload).map(Self::GSM_LINK_STATUS)
34604            }
34605            HEARTBEAT_DATA::ID => HEARTBEAT_DATA::deser(version, payload).map(Self::HEARTBEAT),
34606            HIGHRES_IMU_DATA::ID => {
34607                HIGHRES_IMU_DATA::deser(version, payload).map(Self::HIGHRES_IMU)
34608            }
34609            HIGH_LATENCY_DATA::ID => {
34610                HIGH_LATENCY_DATA::deser(version, payload).map(Self::HIGH_LATENCY)
34611            }
34612            HIGH_LATENCY2_DATA::ID => {
34613                HIGH_LATENCY2_DATA::deser(version, payload).map(Self::HIGH_LATENCY2)
34614            }
34615            HIL_ACTUATOR_CONTROLS_DATA::ID => {
34616                HIL_ACTUATOR_CONTROLS_DATA::deser(version, payload).map(Self::HIL_ACTUATOR_CONTROLS)
34617            }
34618            HIL_CONTROLS_DATA::ID => {
34619                HIL_CONTROLS_DATA::deser(version, payload).map(Self::HIL_CONTROLS)
34620            }
34621            HIL_GPS_DATA::ID => HIL_GPS_DATA::deser(version, payload).map(Self::HIL_GPS),
34622            HIL_OPTICAL_FLOW_DATA::ID => {
34623                HIL_OPTICAL_FLOW_DATA::deser(version, payload).map(Self::HIL_OPTICAL_FLOW)
34624            }
34625            HIL_RC_INPUTS_RAW_DATA::ID => {
34626                HIL_RC_INPUTS_RAW_DATA::deser(version, payload).map(Self::HIL_RC_INPUTS_RAW)
34627            }
34628            HIL_SENSOR_DATA::ID => HIL_SENSOR_DATA::deser(version, payload).map(Self::HIL_SENSOR),
34629            HIL_STATE_DATA::ID => HIL_STATE_DATA::deser(version, payload).map(Self::HIL_STATE),
34630            HIL_STATE_QUATERNION_DATA::ID => {
34631                HIL_STATE_QUATERNION_DATA::deser(version, payload).map(Self::HIL_STATE_QUATERNION)
34632            }
34633            HOME_POSITION_DATA::ID => {
34634                HOME_POSITION_DATA::deser(version, payload).map(Self::HOME_POSITION)
34635            }
34636            HYGROMETER_SENSOR_DATA::ID => {
34637                HYGROMETER_SENSOR_DATA::deser(version, payload).map(Self::HYGROMETER_SENSOR)
34638            }
34639            ILLUMINATOR_STATUS_DATA::ID => {
34640                ILLUMINATOR_STATUS_DATA::deser(version, payload).map(Self::ILLUMINATOR_STATUS)
34641            }
34642            ISBD_LINK_STATUS_DATA::ID => {
34643                ISBD_LINK_STATUS_DATA::deser(version, payload).map(Self::ISBD_LINK_STATUS)
34644            }
34645            LANDING_TARGET_DATA::ID => {
34646                LANDING_TARGET_DATA::deser(version, payload).map(Self::LANDING_TARGET)
34647            }
34648            LINK_NODE_STATUS_DATA::ID => {
34649                LINK_NODE_STATUS_DATA::deser(version, payload).map(Self::LINK_NODE_STATUS)
34650            }
34651            LOCAL_POSITION_NED_DATA::ID => {
34652                LOCAL_POSITION_NED_DATA::deser(version, payload).map(Self::LOCAL_POSITION_NED)
34653            }
34654            LOCAL_POSITION_NED_COV_DATA::ID => LOCAL_POSITION_NED_COV_DATA::deser(version, payload)
34655                .map(Self::LOCAL_POSITION_NED_COV),
34656            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID => {
34657                LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::deser(version, payload)
34658                    .map(Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET)
34659            }
34660            LOGGING_ACK_DATA::ID => {
34661                LOGGING_ACK_DATA::deser(version, payload).map(Self::LOGGING_ACK)
34662            }
34663            LOGGING_DATA_DATA::ID => {
34664                LOGGING_DATA_DATA::deser(version, payload).map(Self::LOGGING_DATA)
34665            }
34666            LOGGING_DATA_ACKED_DATA::ID => {
34667                LOGGING_DATA_ACKED_DATA::deser(version, payload).map(Self::LOGGING_DATA_ACKED)
34668            }
34669            LOG_DATA_DATA::ID => LOG_DATA_DATA::deser(version, payload).map(Self::LOG_DATA),
34670            LOG_ENTRY_DATA::ID => LOG_ENTRY_DATA::deser(version, payload).map(Self::LOG_ENTRY),
34671            LOG_ERASE_DATA::ID => LOG_ERASE_DATA::deser(version, payload).map(Self::LOG_ERASE),
34672            LOG_REQUEST_DATA_DATA::ID => {
34673                LOG_REQUEST_DATA_DATA::deser(version, payload).map(Self::LOG_REQUEST_DATA)
34674            }
34675            LOG_REQUEST_END_DATA::ID => {
34676                LOG_REQUEST_END_DATA::deser(version, payload).map(Self::LOG_REQUEST_END)
34677            }
34678            LOG_REQUEST_LIST_DATA::ID => {
34679                LOG_REQUEST_LIST_DATA::deser(version, payload).map(Self::LOG_REQUEST_LIST)
34680            }
34681            MAG_CAL_REPORT_DATA::ID => {
34682                MAG_CAL_REPORT_DATA::deser(version, payload).map(Self::MAG_CAL_REPORT)
34683            }
34684            MANUAL_CONTROL_DATA::ID => {
34685                MANUAL_CONTROL_DATA::deser(version, payload).map(Self::MANUAL_CONTROL)
34686            }
34687            MANUAL_SETPOINT_DATA::ID => {
34688                MANUAL_SETPOINT_DATA::deser(version, payload).map(Self::MANUAL_SETPOINT)
34689            }
34690            MEMORY_VECT_DATA::ID => {
34691                MEMORY_VECT_DATA::deser(version, payload).map(Self::MEMORY_VECT)
34692            }
34693            MESSAGE_INTERVAL_DATA::ID => {
34694                MESSAGE_INTERVAL_DATA::deser(version, payload).map(Self::MESSAGE_INTERVAL)
34695            }
34696            MISSION_ACK_DATA::ID => {
34697                MISSION_ACK_DATA::deser(version, payload).map(Self::MISSION_ACK)
34698            }
34699            MISSION_CLEAR_ALL_DATA::ID => {
34700                MISSION_CLEAR_ALL_DATA::deser(version, payload).map(Self::MISSION_CLEAR_ALL)
34701            }
34702            MISSION_COUNT_DATA::ID => {
34703                MISSION_COUNT_DATA::deser(version, payload).map(Self::MISSION_COUNT)
34704            }
34705            MISSION_CURRENT_DATA::ID => {
34706                MISSION_CURRENT_DATA::deser(version, payload).map(Self::MISSION_CURRENT)
34707            }
34708            MISSION_ITEM_DATA::ID => {
34709                MISSION_ITEM_DATA::deser(version, payload).map(Self::MISSION_ITEM)
34710            }
34711            MISSION_ITEM_INT_DATA::ID => {
34712                MISSION_ITEM_INT_DATA::deser(version, payload).map(Self::MISSION_ITEM_INT)
34713            }
34714            MISSION_ITEM_REACHED_DATA::ID => {
34715                MISSION_ITEM_REACHED_DATA::deser(version, payload).map(Self::MISSION_ITEM_REACHED)
34716            }
34717            MISSION_REQUEST_DATA::ID => {
34718                MISSION_REQUEST_DATA::deser(version, payload).map(Self::MISSION_REQUEST)
34719            }
34720            MISSION_REQUEST_INT_DATA::ID => {
34721                MISSION_REQUEST_INT_DATA::deser(version, payload).map(Self::MISSION_REQUEST_INT)
34722            }
34723            MISSION_REQUEST_LIST_DATA::ID => {
34724                MISSION_REQUEST_LIST_DATA::deser(version, payload).map(Self::MISSION_REQUEST_LIST)
34725            }
34726            MISSION_REQUEST_PARTIAL_LIST_DATA::ID => {
34727                MISSION_REQUEST_PARTIAL_LIST_DATA::deser(version, payload)
34728                    .map(Self::MISSION_REQUEST_PARTIAL_LIST)
34729            }
34730            MISSION_SET_CURRENT_DATA::ID => {
34731                MISSION_SET_CURRENT_DATA::deser(version, payload).map(Self::MISSION_SET_CURRENT)
34732            }
34733            MISSION_WRITE_PARTIAL_LIST_DATA::ID => {
34734                MISSION_WRITE_PARTIAL_LIST_DATA::deser(version, payload)
34735                    .map(Self::MISSION_WRITE_PARTIAL_LIST)
34736            }
34737            MOUNT_ORIENTATION_DATA::ID => {
34738                MOUNT_ORIENTATION_DATA::deser(version, payload).map(Self::MOUNT_ORIENTATION)
34739            }
34740            NAMED_VALUE_FLOAT_DATA::ID => {
34741                NAMED_VALUE_FLOAT_DATA::deser(version, payload).map(Self::NAMED_VALUE_FLOAT)
34742            }
34743            NAMED_VALUE_INT_DATA::ID => {
34744                NAMED_VALUE_INT_DATA::deser(version, payload).map(Self::NAMED_VALUE_INT)
34745            }
34746            NAV_CONTROLLER_OUTPUT_DATA::ID => {
34747                NAV_CONTROLLER_OUTPUT_DATA::deser(version, payload).map(Self::NAV_CONTROLLER_OUTPUT)
34748            }
34749            OBSTACLE_DISTANCE_DATA::ID => {
34750                OBSTACLE_DISTANCE_DATA::deser(version, payload).map(Self::OBSTACLE_DISTANCE)
34751            }
34752            ODOMETRY_DATA::ID => ODOMETRY_DATA::deser(version, payload).map(Self::ODOMETRY),
34753            ONBOARD_COMPUTER_STATUS_DATA::ID => {
34754                ONBOARD_COMPUTER_STATUS_DATA::deser(version, payload)
34755                    .map(Self::ONBOARD_COMPUTER_STATUS)
34756            }
34757            OPEN_DRONE_ID_ARM_STATUS_DATA::ID => {
34758                OPEN_DRONE_ID_ARM_STATUS_DATA::deser(version, payload)
34759                    .map(Self::OPEN_DRONE_ID_ARM_STATUS)
34760            }
34761            OPEN_DRONE_ID_AUTHENTICATION_DATA::ID => {
34762                OPEN_DRONE_ID_AUTHENTICATION_DATA::deser(version, payload)
34763                    .map(Self::OPEN_DRONE_ID_AUTHENTICATION)
34764            }
34765            OPEN_DRONE_ID_BASIC_ID_DATA::ID => OPEN_DRONE_ID_BASIC_ID_DATA::deser(version, payload)
34766                .map(Self::OPEN_DRONE_ID_BASIC_ID),
34767            OPEN_DRONE_ID_LOCATION_DATA::ID => OPEN_DRONE_ID_LOCATION_DATA::deser(version, payload)
34768                .map(Self::OPEN_DRONE_ID_LOCATION),
34769            OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID => {
34770                OPEN_DRONE_ID_MESSAGE_PACK_DATA::deser(version, payload)
34771                    .map(Self::OPEN_DRONE_ID_MESSAGE_PACK)
34772            }
34773            OPEN_DRONE_ID_OPERATOR_ID_DATA::ID => {
34774                OPEN_DRONE_ID_OPERATOR_ID_DATA::deser(version, payload)
34775                    .map(Self::OPEN_DRONE_ID_OPERATOR_ID)
34776            }
34777            OPEN_DRONE_ID_SELF_ID_DATA::ID => {
34778                OPEN_DRONE_ID_SELF_ID_DATA::deser(version, payload).map(Self::OPEN_DRONE_ID_SELF_ID)
34779            }
34780            OPEN_DRONE_ID_SYSTEM_DATA::ID => {
34781                OPEN_DRONE_ID_SYSTEM_DATA::deser(version, payload).map(Self::OPEN_DRONE_ID_SYSTEM)
34782            }
34783            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID => {
34784                OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::deser(version, payload)
34785                    .map(Self::OPEN_DRONE_ID_SYSTEM_UPDATE)
34786            }
34787            OPTICAL_FLOW_DATA::ID => {
34788                OPTICAL_FLOW_DATA::deser(version, payload).map(Self::OPTICAL_FLOW)
34789            }
34790            OPTICAL_FLOW_RAD_DATA::ID => {
34791                OPTICAL_FLOW_RAD_DATA::deser(version, payload).map(Self::OPTICAL_FLOW_RAD)
34792            }
34793            ORBIT_EXECUTION_STATUS_DATA::ID => ORBIT_EXECUTION_STATUS_DATA::deser(version, payload)
34794                .map(Self::ORBIT_EXECUTION_STATUS),
34795            PARAM_EXT_ACK_DATA::ID => {
34796                PARAM_EXT_ACK_DATA::deser(version, payload).map(Self::PARAM_EXT_ACK)
34797            }
34798            PARAM_EXT_REQUEST_LIST_DATA::ID => PARAM_EXT_REQUEST_LIST_DATA::deser(version, payload)
34799                .map(Self::PARAM_EXT_REQUEST_LIST),
34800            PARAM_EXT_REQUEST_READ_DATA::ID => PARAM_EXT_REQUEST_READ_DATA::deser(version, payload)
34801                .map(Self::PARAM_EXT_REQUEST_READ),
34802            PARAM_EXT_SET_DATA::ID => {
34803                PARAM_EXT_SET_DATA::deser(version, payload).map(Self::PARAM_EXT_SET)
34804            }
34805            PARAM_EXT_VALUE_DATA::ID => {
34806                PARAM_EXT_VALUE_DATA::deser(version, payload).map(Self::PARAM_EXT_VALUE)
34807            }
34808            PARAM_MAP_RC_DATA::ID => {
34809                PARAM_MAP_RC_DATA::deser(version, payload).map(Self::PARAM_MAP_RC)
34810            }
34811            PARAM_REQUEST_LIST_DATA::ID => {
34812                PARAM_REQUEST_LIST_DATA::deser(version, payload).map(Self::PARAM_REQUEST_LIST)
34813            }
34814            PARAM_REQUEST_READ_DATA::ID => {
34815                PARAM_REQUEST_READ_DATA::deser(version, payload).map(Self::PARAM_REQUEST_READ)
34816            }
34817            PARAM_SET_DATA::ID => PARAM_SET_DATA::deser(version, payload).map(Self::PARAM_SET),
34818            PARAM_VALUE_DATA::ID => {
34819                PARAM_VALUE_DATA::deser(version, payload).map(Self::PARAM_VALUE)
34820            }
34821            PING_DATA::ID => PING_DATA::deser(version, payload).map(Self::PING),
34822            PLAY_TUNE_DATA::ID => PLAY_TUNE_DATA::deser(version, payload).map(Self::PLAY_TUNE),
34823            PLAY_TUNE_V2_DATA::ID => {
34824                PLAY_TUNE_V2_DATA::deser(version, payload).map(Self::PLAY_TUNE_V2)
34825            }
34826            POSITION_TARGET_GLOBAL_INT_DATA::ID => {
34827                POSITION_TARGET_GLOBAL_INT_DATA::deser(version, payload)
34828                    .map(Self::POSITION_TARGET_GLOBAL_INT)
34829            }
34830            POSITION_TARGET_LOCAL_NED_DATA::ID => {
34831                POSITION_TARGET_LOCAL_NED_DATA::deser(version, payload)
34832                    .map(Self::POSITION_TARGET_LOCAL_NED)
34833            }
34834            POWER_STATUS_DATA::ID => {
34835                POWER_STATUS_DATA::deser(version, payload).map(Self::POWER_STATUS)
34836            }
34837            PROTOCOL_VERSION_DATA::ID => {
34838                PROTOCOL_VERSION_DATA::deser(version, payload).map(Self::PROTOCOL_VERSION)
34839            }
34840            RADIO_STATUS_DATA::ID => {
34841                RADIO_STATUS_DATA::deser(version, payload).map(Self::RADIO_STATUS)
34842            }
34843            RAW_IMU_DATA::ID => RAW_IMU_DATA::deser(version, payload).map(Self::RAW_IMU),
34844            RAW_PRESSURE_DATA::ID => {
34845                RAW_PRESSURE_DATA::deser(version, payload).map(Self::RAW_PRESSURE)
34846            }
34847            RAW_RPM_DATA::ID => RAW_RPM_DATA::deser(version, payload).map(Self::RAW_RPM),
34848            RC_CHANNELS_DATA::ID => {
34849                RC_CHANNELS_DATA::deser(version, payload).map(Self::RC_CHANNELS)
34850            }
34851            RC_CHANNELS_OVERRIDE_DATA::ID => {
34852                RC_CHANNELS_OVERRIDE_DATA::deser(version, payload).map(Self::RC_CHANNELS_OVERRIDE)
34853            }
34854            RC_CHANNELS_RAW_DATA::ID => {
34855                RC_CHANNELS_RAW_DATA::deser(version, payload).map(Self::RC_CHANNELS_RAW)
34856            }
34857            RC_CHANNELS_SCALED_DATA::ID => {
34858                RC_CHANNELS_SCALED_DATA::deser(version, payload).map(Self::RC_CHANNELS_SCALED)
34859            }
34860            REQUEST_DATA_STREAM_DATA::ID => {
34861                REQUEST_DATA_STREAM_DATA::deser(version, payload).map(Self::REQUEST_DATA_STREAM)
34862            }
34863            REQUEST_EVENT_DATA::ID => {
34864                REQUEST_EVENT_DATA::deser(version, payload).map(Self::REQUEST_EVENT)
34865            }
34866            RESOURCE_REQUEST_DATA::ID => {
34867                RESOURCE_REQUEST_DATA::deser(version, payload).map(Self::RESOURCE_REQUEST)
34868            }
34869            RESPONSE_EVENT_ERROR_DATA::ID => {
34870                RESPONSE_EVENT_ERROR_DATA::deser(version, payload).map(Self::RESPONSE_EVENT_ERROR)
34871            }
34872            SAFETY_ALLOWED_AREA_DATA::ID => {
34873                SAFETY_ALLOWED_AREA_DATA::deser(version, payload).map(Self::SAFETY_ALLOWED_AREA)
34874            }
34875            SAFETY_SET_ALLOWED_AREA_DATA::ID => {
34876                SAFETY_SET_ALLOWED_AREA_DATA::deser(version, payload)
34877                    .map(Self::SAFETY_SET_ALLOWED_AREA)
34878            }
34879            SATCOM_LINK_STATUS_DATA::ID => {
34880                SATCOM_LINK_STATUS_DATA::deser(version, payload).map(Self::SATCOM_LINK_STATUS)
34881            }
34882            SCALED_IMU_DATA::ID => SCALED_IMU_DATA::deser(version, payload).map(Self::SCALED_IMU),
34883            SCALED_IMU2_DATA::ID => {
34884                SCALED_IMU2_DATA::deser(version, payload).map(Self::SCALED_IMU2)
34885            }
34886            SCALED_IMU3_DATA::ID => {
34887                SCALED_IMU3_DATA::deser(version, payload).map(Self::SCALED_IMU3)
34888            }
34889            SCALED_PRESSURE_DATA::ID => {
34890                SCALED_PRESSURE_DATA::deser(version, payload).map(Self::SCALED_PRESSURE)
34891            }
34892            SCALED_PRESSURE2_DATA::ID => {
34893                SCALED_PRESSURE2_DATA::deser(version, payload).map(Self::SCALED_PRESSURE2)
34894            }
34895            SCALED_PRESSURE3_DATA::ID => {
34896                SCALED_PRESSURE3_DATA::deser(version, payload).map(Self::SCALED_PRESSURE3)
34897            }
34898            SENSORPOD_STATUS_DATA::ID => {
34899                SENSORPOD_STATUS_DATA::deser(version, payload).map(Self::SENSORPOD_STATUS)
34900            }
34901            SENSOR_AIRFLOW_ANGLES_DATA::ID => {
34902                SENSOR_AIRFLOW_ANGLES_DATA::deser(version, payload).map(Self::SENSOR_AIRFLOW_ANGLES)
34903            }
34904            SENS_ATMOS_DATA::ID => SENS_ATMOS_DATA::deser(version, payload).map(Self::SENS_ATMOS),
34905            SENS_BATMON_DATA::ID => {
34906                SENS_BATMON_DATA::deser(version, payload).map(Self::SENS_BATMON)
34907            }
34908            SENS_MPPT_DATA::ID => SENS_MPPT_DATA::deser(version, payload).map(Self::SENS_MPPT),
34909            SENS_POWER_DATA::ID => SENS_POWER_DATA::deser(version, payload).map(Self::SENS_POWER),
34910            SENS_POWER_BOARD_DATA::ID => {
34911                SENS_POWER_BOARD_DATA::deser(version, payload).map(Self::SENS_POWER_BOARD)
34912            }
34913            SERIAL_CONTROL_DATA::ID => {
34914                SERIAL_CONTROL_DATA::deser(version, payload).map(Self::SERIAL_CONTROL)
34915            }
34916            SERVO_OUTPUT_RAW_DATA::ID => {
34917                SERVO_OUTPUT_RAW_DATA::deser(version, payload).map(Self::SERVO_OUTPUT_RAW)
34918            }
34919            SETUP_SIGNING_DATA::ID => {
34920                SETUP_SIGNING_DATA::deser(version, payload).map(Self::SETUP_SIGNING)
34921            }
34922            SET_ACTUATOR_CONTROL_TARGET_DATA::ID => {
34923                SET_ACTUATOR_CONTROL_TARGET_DATA::deser(version, payload)
34924                    .map(Self::SET_ACTUATOR_CONTROL_TARGET)
34925            }
34926            SET_ATTITUDE_TARGET_DATA::ID => {
34927                SET_ATTITUDE_TARGET_DATA::deser(version, payload).map(Self::SET_ATTITUDE_TARGET)
34928            }
34929            SET_GPS_GLOBAL_ORIGIN_DATA::ID => {
34930                SET_GPS_GLOBAL_ORIGIN_DATA::deser(version, payload).map(Self::SET_GPS_GLOBAL_ORIGIN)
34931            }
34932            SET_HOME_POSITION_DATA::ID => {
34933                SET_HOME_POSITION_DATA::deser(version, payload).map(Self::SET_HOME_POSITION)
34934            }
34935            SET_MODE_DATA::ID => SET_MODE_DATA::deser(version, payload).map(Self::SET_MODE),
34936            SET_POSITION_TARGET_GLOBAL_INT_DATA::ID => {
34937                SET_POSITION_TARGET_GLOBAL_INT_DATA::deser(version, payload)
34938                    .map(Self::SET_POSITION_TARGET_GLOBAL_INT)
34939            }
34940            SET_POSITION_TARGET_LOCAL_NED_DATA::ID => {
34941                SET_POSITION_TARGET_LOCAL_NED_DATA::deser(version, payload)
34942                    .map(Self::SET_POSITION_TARGET_LOCAL_NED)
34943            }
34944            SIM_STATE_DATA::ID => SIM_STATE_DATA::deser(version, payload).map(Self::SIM_STATE),
34945            SMART_BATTERY_INFO_DATA::ID => {
34946                SMART_BATTERY_INFO_DATA::deser(version, payload).map(Self::SMART_BATTERY_INFO)
34947            }
34948            STATUSTEXT_DATA::ID => STATUSTEXT_DATA::deser(version, payload).map(Self::STATUSTEXT),
34949            STORAGE_INFORMATION_DATA::ID => {
34950                STORAGE_INFORMATION_DATA::deser(version, payload).map(Self::STORAGE_INFORMATION)
34951            }
34952            SUPPORTED_TUNES_DATA::ID => {
34953                SUPPORTED_TUNES_DATA::deser(version, payload).map(Self::SUPPORTED_TUNES)
34954            }
34955            SYSTEM_TIME_DATA::ID => {
34956                SYSTEM_TIME_DATA::deser(version, payload).map(Self::SYSTEM_TIME)
34957            }
34958            SYS_STATUS_DATA::ID => SYS_STATUS_DATA::deser(version, payload).map(Self::SYS_STATUS),
34959            TERRAIN_CHECK_DATA::ID => {
34960                TERRAIN_CHECK_DATA::deser(version, payload).map(Self::TERRAIN_CHECK)
34961            }
34962            TERRAIN_DATA_DATA::ID => {
34963                TERRAIN_DATA_DATA::deser(version, payload).map(Self::TERRAIN_DATA)
34964            }
34965            TERRAIN_REPORT_DATA::ID => {
34966                TERRAIN_REPORT_DATA::deser(version, payload).map(Self::TERRAIN_REPORT)
34967            }
34968            TERRAIN_REQUEST_DATA::ID => {
34969                TERRAIN_REQUEST_DATA::deser(version, payload).map(Self::TERRAIN_REQUEST)
34970            }
34971            TIMESYNC_DATA::ID => TIMESYNC_DATA::deser(version, payload).map(Self::TIMESYNC),
34972            TIME_ESTIMATE_TO_TARGET_DATA::ID => {
34973                TIME_ESTIMATE_TO_TARGET_DATA::deser(version, payload)
34974                    .map(Self::TIME_ESTIMATE_TO_TARGET)
34975            }
34976            TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID => {
34977                TRAJECTORY_REPRESENTATION_BEZIER_DATA::deser(version, payload)
34978                    .map(Self::TRAJECTORY_REPRESENTATION_BEZIER)
34979            }
34980            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID => {
34981                TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::deser(version, payload)
34982                    .map(Self::TRAJECTORY_REPRESENTATION_WAYPOINTS)
34983            }
34984            TUNNEL_DATA::ID => TUNNEL_DATA::deser(version, payload).map(Self::TUNNEL),
34985            UAVCAN_NODE_INFO_DATA::ID => {
34986                UAVCAN_NODE_INFO_DATA::deser(version, payload).map(Self::UAVCAN_NODE_INFO)
34987            }
34988            UAVCAN_NODE_STATUS_DATA::ID => {
34989                UAVCAN_NODE_STATUS_DATA::deser(version, payload).map(Self::UAVCAN_NODE_STATUS)
34990            }
34991            UTM_GLOBAL_POSITION_DATA::ID => {
34992                UTM_GLOBAL_POSITION_DATA::deser(version, payload).map(Self::UTM_GLOBAL_POSITION)
34993            }
34994            V2_EXTENSION_DATA::ID => {
34995                V2_EXTENSION_DATA::deser(version, payload).map(Self::V2_EXTENSION)
34996            }
34997            VFR_HUD_DATA::ID => VFR_HUD_DATA::deser(version, payload).map(Self::VFR_HUD),
34998            VIBRATION_DATA::ID => VIBRATION_DATA::deser(version, payload).map(Self::VIBRATION),
34999            VICON_POSITION_ESTIMATE_DATA::ID => {
35000                VICON_POSITION_ESTIMATE_DATA::deser(version, payload)
35001                    .map(Self::VICON_POSITION_ESTIMATE)
35002            }
35003            VIDEO_STREAM_INFORMATION_DATA::ID => {
35004                VIDEO_STREAM_INFORMATION_DATA::deser(version, payload)
35005                    .map(Self::VIDEO_STREAM_INFORMATION)
35006            }
35007            VIDEO_STREAM_STATUS_DATA::ID => {
35008                VIDEO_STREAM_STATUS_DATA::deser(version, payload).map(Self::VIDEO_STREAM_STATUS)
35009            }
35010            VISION_POSITION_ESTIMATE_DATA::ID => {
35011                VISION_POSITION_ESTIMATE_DATA::deser(version, payload)
35012                    .map(Self::VISION_POSITION_ESTIMATE)
35013            }
35014            VISION_SPEED_ESTIMATE_DATA::ID => {
35015                VISION_SPEED_ESTIMATE_DATA::deser(version, payload).map(Self::VISION_SPEED_ESTIMATE)
35016            }
35017            WHEEL_DISTANCE_DATA::ID => {
35018                WHEEL_DISTANCE_DATA::deser(version, payload).map(Self::WHEEL_DISTANCE)
35019            }
35020            WIFI_CONFIG_AP_DATA::ID => {
35021                WIFI_CONFIG_AP_DATA::deser(version, payload).map(Self::WIFI_CONFIG_AP)
35022            }
35023            WINCH_STATUS_DATA::ID => {
35024                WINCH_STATUS_DATA::deser(version, payload).map(Self::WINCH_STATUS)
35025            }
35026            WIND_COV_DATA::ID => WIND_COV_DATA::deser(version, payload).map(Self::WIND_COV),
35027            _ => Err(::mavlink_core::error::ParserError::UnknownMessage { id }),
35028        }
35029    }
35030    fn message_name(&self) -> &'static str {
35031        match self {
35032            Self::ACTUATOR_CONTROL_TARGET(..) => ACTUATOR_CONTROL_TARGET_DATA::NAME,
35033            Self::ACTUATOR_OUTPUT_STATUS(..) => ACTUATOR_OUTPUT_STATUS_DATA::NAME,
35034            Self::ADSB_VEHICLE(..) => ADSB_VEHICLE_DATA::NAME,
35035            Self::AIS_VESSEL(..) => AIS_VESSEL_DATA::NAME,
35036            Self::ALTITUDE(..) => ALTITUDE_DATA::NAME,
35037            Self::ASLCTRL_DATA(..) => ASLCTRL_DATA_DATA::NAME,
35038            Self::ASLCTRL_DEBUG(..) => ASLCTRL_DEBUG_DATA::NAME,
35039            Self::ASLUAV_STATUS(..) => ASLUAV_STATUS_DATA::NAME,
35040            Self::ASL_OBCTRL(..) => ASL_OBCTRL_DATA::NAME,
35041            Self::ATTITUDE(..) => ATTITUDE_DATA::NAME,
35042            Self::ATTITUDE_QUATERNION(..) => ATTITUDE_QUATERNION_DATA::NAME,
35043            Self::ATTITUDE_QUATERNION_COV(..) => ATTITUDE_QUATERNION_COV_DATA::NAME,
35044            Self::ATTITUDE_TARGET(..) => ATTITUDE_TARGET_DATA::NAME,
35045            Self::ATT_POS_MOCAP(..) => ATT_POS_MOCAP_DATA::NAME,
35046            Self::AUTH_KEY(..) => AUTH_KEY_DATA::NAME,
35047            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(..) => {
35048                AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::NAME
35049            }
35050            Self::AUTOPILOT_VERSION(..) => AUTOPILOT_VERSION_DATA::NAME,
35051            Self::AVAILABLE_MODES(..) => AVAILABLE_MODES_DATA::NAME,
35052            Self::AVAILABLE_MODES_MONITOR(..) => AVAILABLE_MODES_MONITOR_DATA::NAME,
35053            Self::BATTERY_INFO(..) => BATTERY_INFO_DATA::NAME,
35054            Self::BATTERY_STATUS(..) => BATTERY_STATUS_DATA::NAME,
35055            Self::BUTTON_CHANGE(..) => BUTTON_CHANGE_DATA::NAME,
35056            Self::CAMERA_CAPTURE_STATUS(..) => CAMERA_CAPTURE_STATUS_DATA::NAME,
35057            Self::CAMERA_FOV_STATUS(..) => CAMERA_FOV_STATUS_DATA::NAME,
35058            Self::CAMERA_IMAGE_CAPTURED(..) => CAMERA_IMAGE_CAPTURED_DATA::NAME,
35059            Self::CAMERA_INFORMATION(..) => CAMERA_INFORMATION_DATA::NAME,
35060            Self::CAMERA_SETTINGS(..) => CAMERA_SETTINGS_DATA::NAME,
35061            Self::CAMERA_THERMAL_RANGE(..) => CAMERA_THERMAL_RANGE_DATA::NAME,
35062            Self::CAMERA_TRACKING_GEO_STATUS(..) => CAMERA_TRACKING_GEO_STATUS_DATA::NAME,
35063            Self::CAMERA_TRACKING_IMAGE_STATUS(..) => CAMERA_TRACKING_IMAGE_STATUS_DATA::NAME,
35064            Self::CAMERA_TRIGGER(..) => CAMERA_TRIGGER_DATA::NAME,
35065            Self::CANFD_FRAME(..) => CANFD_FRAME_DATA::NAME,
35066            Self::CAN_FILTER_MODIFY(..) => CAN_FILTER_MODIFY_DATA::NAME,
35067            Self::CAN_FRAME(..) => CAN_FRAME_DATA::NAME,
35068            Self::CELLULAR_CONFIG(..) => CELLULAR_CONFIG_DATA::NAME,
35069            Self::CELLULAR_STATUS(..) => CELLULAR_STATUS_DATA::NAME,
35070            Self::CHANGE_OPERATOR_CONTROL(..) => CHANGE_OPERATOR_CONTROL_DATA::NAME,
35071            Self::CHANGE_OPERATOR_CONTROL_ACK(..) => CHANGE_OPERATOR_CONTROL_ACK_DATA::NAME,
35072            Self::COLLISION(..) => COLLISION_DATA::NAME,
35073            Self::COMMAND_ACK(..) => COMMAND_ACK_DATA::NAME,
35074            Self::COMMAND_CANCEL(..) => COMMAND_CANCEL_DATA::NAME,
35075            Self::COMMAND_INT(..) => COMMAND_INT_DATA::NAME,
35076            Self::COMMAND_INT_STAMPED(..) => COMMAND_INT_STAMPED_DATA::NAME,
35077            Self::COMMAND_LONG(..) => COMMAND_LONG_DATA::NAME,
35078            Self::COMMAND_LONG_STAMPED(..) => COMMAND_LONG_STAMPED_DATA::NAME,
35079            Self::COMPONENT_INFORMATION(..) => COMPONENT_INFORMATION_DATA::NAME,
35080            Self::COMPONENT_INFORMATION_BASIC(..) => COMPONENT_INFORMATION_BASIC_DATA::NAME,
35081            Self::COMPONENT_METADATA(..) => COMPONENT_METADATA_DATA::NAME,
35082            Self::CONTROL_SYSTEM_STATE(..) => CONTROL_SYSTEM_STATE_DATA::NAME,
35083            Self::CURRENT_EVENT_SEQUENCE(..) => CURRENT_EVENT_SEQUENCE_DATA::NAME,
35084            Self::CURRENT_MODE(..) => CURRENT_MODE_DATA::NAME,
35085            Self::DATA_STREAM(..) => DATA_STREAM_DATA::NAME,
35086            Self::DATA_TRANSMISSION_HANDSHAKE(..) => DATA_TRANSMISSION_HANDSHAKE_DATA::NAME,
35087            Self::DEBUG(..) => DEBUG_DATA::NAME,
35088            Self::DEBUG_FLOAT_ARRAY(..) => DEBUG_FLOAT_ARRAY_DATA::NAME,
35089            Self::DEBUG_VECT(..) => DEBUG_VECT_DATA::NAME,
35090            Self::DISTANCE_SENSOR(..) => DISTANCE_SENSOR_DATA::NAME,
35091            Self::EFI_STATUS(..) => EFI_STATUS_DATA::NAME,
35092            Self::EKF_EXT(..) => EKF_EXT_DATA::NAME,
35093            Self::ENCAPSULATED_DATA(..) => ENCAPSULATED_DATA_DATA::NAME,
35094            Self::ESC_INFO(..) => ESC_INFO_DATA::NAME,
35095            Self::ESC_STATUS(..) => ESC_STATUS_DATA::NAME,
35096            Self::ESTIMATOR_STATUS(..) => ESTIMATOR_STATUS_DATA::NAME,
35097            Self::EVENT(..) => EVENT_DATA::NAME,
35098            Self::EXTENDED_SYS_STATE(..) => EXTENDED_SYS_STATE_DATA::NAME,
35099            Self::FENCE_STATUS(..) => FENCE_STATUS_DATA::NAME,
35100            Self::FILE_TRANSFER_PROTOCOL(..) => FILE_TRANSFER_PROTOCOL_DATA::NAME,
35101            Self::FLIGHT_INFORMATION(..) => FLIGHT_INFORMATION_DATA::NAME,
35102            Self::FOLLOW_TARGET(..) => FOLLOW_TARGET_DATA::NAME,
35103            Self::FUEL_STATUS(..) => FUEL_STATUS_DATA::NAME,
35104            Self::FW_SOARING_DATA(..) => FW_SOARING_DATA_DATA::NAME,
35105            Self::GENERATOR_STATUS(..) => GENERATOR_STATUS_DATA::NAME,
35106            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(..) => GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::NAME,
35107            Self::GIMBAL_DEVICE_INFORMATION(..) => GIMBAL_DEVICE_INFORMATION_DATA::NAME,
35108            Self::GIMBAL_DEVICE_SET_ATTITUDE(..) => GIMBAL_DEVICE_SET_ATTITUDE_DATA::NAME,
35109            Self::GIMBAL_MANAGER_INFORMATION(..) => GIMBAL_MANAGER_INFORMATION_DATA::NAME,
35110            Self::GIMBAL_MANAGER_SET_ATTITUDE(..) => GIMBAL_MANAGER_SET_ATTITUDE_DATA::NAME,
35111            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(..) => {
35112                GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::NAME
35113            }
35114            Self::GIMBAL_MANAGER_SET_PITCHYAW(..) => GIMBAL_MANAGER_SET_PITCHYAW_DATA::NAME,
35115            Self::GIMBAL_MANAGER_STATUS(..) => GIMBAL_MANAGER_STATUS_DATA::NAME,
35116            Self::GLOBAL_POSITION_INT(..) => GLOBAL_POSITION_INT_DATA::NAME,
35117            Self::GLOBAL_POSITION_INT_COV(..) => GLOBAL_POSITION_INT_COV_DATA::NAME,
35118            Self::GLOBAL_VISION_POSITION_ESTIMATE(..) => GLOBAL_VISION_POSITION_ESTIMATE_DATA::NAME,
35119            Self::GPS2_RAW(..) => GPS2_RAW_DATA::NAME,
35120            Self::GPS2_RTK(..) => GPS2_RTK_DATA::NAME,
35121            Self::GPS_GLOBAL_ORIGIN(..) => GPS_GLOBAL_ORIGIN_DATA::NAME,
35122            Self::GPS_INJECT_DATA(..) => GPS_INJECT_DATA_DATA::NAME,
35123            Self::GPS_INPUT(..) => GPS_INPUT_DATA::NAME,
35124            Self::GPS_RAW_INT(..) => GPS_RAW_INT_DATA::NAME,
35125            Self::GPS_RTCM_DATA(..) => GPS_RTCM_DATA_DATA::NAME,
35126            Self::GPS_RTK(..) => GPS_RTK_DATA::NAME,
35127            Self::GPS_STATUS(..) => GPS_STATUS_DATA::NAME,
35128            Self::GSM_LINK_STATUS(..) => GSM_LINK_STATUS_DATA::NAME,
35129            Self::HEARTBEAT(..) => HEARTBEAT_DATA::NAME,
35130            Self::HIGHRES_IMU(..) => HIGHRES_IMU_DATA::NAME,
35131            Self::HIGH_LATENCY(..) => HIGH_LATENCY_DATA::NAME,
35132            Self::HIGH_LATENCY2(..) => HIGH_LATENCY2_DATA::NAME,
35133            Self::HIL_ACTUATOR_CONTROLS(..) => HIL_ACTUATOR_CONTROLS_DATA::NAME,
35134            Self::HIL_CONTROLS(..) => HIL_CONTROLS_DATA::NAME,
35135            Self::HIL_GPS(..) => HIL_GPS_DATA::NAME,
35136            Self::HIL_OPTICAL_FLOW(..) => HIL_OPTICAL_FLOW_DATA::NAME,
35137            Self::HIL_RC_INPUTS_RAW(..) => HIL_RC_INPUTS_RAW_DATA::NAME,
35138            Self::HIL_SENSOR(..) => HIL_SENSOR_DATA::NAME,
35139            Self::HIL_STATE(..) => HIL_STATE_DATA::NAME,
35140            Self::HIL_STATE_QUATERNION(..) => HIL_STATE_QUATERNION_DATA::NAME,
35141            Self::HOME_POSITION(..) => HOME_POSITION_DATA::NAME,
35142            Self::HYGROMETER_SENSOR(..) => HYGROMETER_SENSOR_DATA::NAME,
35143            Self::ILLUMINATOR_STATUS(..) => ILLUMINATOR_STATUS_DATA::NAME,
35144            Self::ISBD_LINK_STATUS(..) => ISBD_LINK_STATUS_DATA::NAME,
35145            Self::LANDING_TARGET(..) => LANDING_TARGET_DATA::NAME,
35146            Self::LINK_NODE_STATUS(..) => LINK_NODE_STATUS_DATA::NAME,
35147            Self::LOCAL_POSITION_NED(..) => LOCAL_POSITION_NED_DATA::NAME,
35148            Self::LOCAL_POSITION_NED_COV(..) => LOCAL_POSITION_NED_COV_DATA::NAME,
35149            Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(..) => {
35150                LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::NAME
35151            }
35152            Self::LOGGING_ACK(..) => LOGGING_ACK_DATA::NAME,
35153            Self::LOGGING_DATA(..) => LOGGING_DATA_DATA::NAME,
35154            Self::LOGGING_DATA_ACKED(..) => LOGGING_DATA_ACKED_DATA::NAME,
35155            Self::LOG_DATA(..) => LOG_DATA_DATA::NAME,
35156            Self::LOG_ENTRY(..) => LOG_ENTRY_DATA::NAME,
35157            Self::LOG_ERASE(..) => LOG_ERASE_DATA::NAME,
35158            Self::LOG_REQUEST_DATA(..) => LOG_REQUEST_DATA_DATA::NAME,
35159            Self::LOG_REQUEST_END(..) => LOG_REQUEST_END_DATA::NAME,
35160            Self::LOG_REQUEST_LIST(..) => LOG_REQUEST_LIST_DATA::NAME,
35161            Self::MAG_CAL_REPORT(..) => MAG_CAL_REPORT_DATA::NAME,
35162            Self::MANUAL_CONTROL(..) => MANUAL_CONTROL_DATA::NAME,
35163            Self::MANUAL_SETPOINT(..) => MANUAL_SETPOINT_DATA::NAME,
35164            Self::MEMORY_VECT(..) => MEMORY_VECT_DATA::NAME,
35165            Self::MESSAGE_INTERVAL(..) => MESSAGE_INTERVAL_DATA::NAME,
35166            Self::MISSION_ACK(..) => MISSION_ACK_DATA::NAME,
35167            Self::MISSION_CLEAR_ALL(..) => MISSION_CLEAR_ALL_DATA::NAME,
35168            Self::MISSION_COUNT(..) => MISSION_COUNT_DATA::NAME,
35169            Self::MISSION_CURRENT(..) => MISSION_CURRENT_DATA::NAME,
35170            Self::MISSION_ITEM(..) => MISSION_ITEM_DATA::NAME,
35171            Self::MISSION_ITEM_INT(..) => MISSION_ITEM_INT_DATA::NAME,
35172            Self::MISSION_ITEM_REACHED(..) => MISSION_ITEM_REACHED_DATA::NAME,
35173            Self::MISSION_REQUEST(..) => MISSION_REQUEST_DATA::NAME,
35174            Self::MISSION_REQUEST_INT(..) => MISSION_REQUEST_INT_DATA::NAME,
35175            Self::MISSION_REQUEST_LIST(..) => MISSION_REQUEST_LIST_DATA::NAME,
35176            Self::MISSION_REQUEST_PARTIAL_LIST(..) => MISSION_REQUEST_PARTIAL_LIST_DATA::NAME,
35177            Self::MISSION_SET_CURRENT(..) => MISSION_SET_CURRENT_DATA::NAME,
35178            Self::MISSION_WRITE_PARTIAL_LIST(..) => MISSION_WRITE_PARTIAL_LIST_DATA::NAME,
35179            Self::MOUNT_ORIENTATION(..) => MOUNT_ORIENTATION_DATA::NAME,
35180            Self::NAMED_VALUE_FLOAT(..) => NAMED_VALUE_FLOAT_DATA::NAME,
35181            Self::NAMED_VALUE_INT(..) => NAMED_VALUE_INT_DATA::NAME,
35182            Self::NAV_CONTROLLER_OUTPUT(..) => NAV_CONTROLLER_OUTPUT_DATA::NAME,
35183            Self::OBSTACLE_DISTANCE(..) => OBSTACLE_DISTANCE_DATA::NAME,
35184            Self::ODOMETRY(..) => ODOMETRY_DATA::NAME,
35185            Self::ONBOARD_COMPUTER_STATUS(..) => ONBOARD_COMPUTER_STATUS_DATA::NAME,
35186            Self::OPEN_DRONE_ID_ARM_STATUS(..) => OPEN_DRONE_ID_ARM_STATUS_DATA::NAME,
35187            Self::OPEN_DRONE_ID_AUTHENTICATION(..) => OPEN_DRONE_ID_AUTHENTICATION_DATA::NAME,
35188            Self::OPEN_DRONE_ID_BASIC_ID(..) => OPEN_DRONE_ID_BASIC_ID_DATA::NAME,
35189            Self::OPEN_DRONE_ID_LOCATION(..) => OPEN_DRONE_ID_LOCATION_DATA::NAME,
35190            Self::OPEN_DRONE_ID_MESSAGE_PACK(..) => OPEN_DRONE_ID_MESSAGE_PACK_DATA::NAME,
35191            Self::OPEN_DRONE_ID_OPERATOR_ID(..) => OPEN_DRONE_ID_OPERATOR_ID_DATA::NAME,
35192            Self::OPEN_DRONE_ID_SELF_ID(..) => OPEN_DRONE_ID_SELF_ID_DATA::NAME,
35193            Self::OPEN_DRONE_ID_SYSTEM(..) => OPEN_DRONE_ID_SYSTEM_DATA::NAME,
35194            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(..) => OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::NAME,
35195            Self::OPTICAL_FLOW(..) => OPTICAL_FLOW_DATA::NAME,
35196            Self::OPTICAL_FLOW_RAD(..) => OPTICAL_FLOW_RAD_DATA::NAME,
35197            Self::ORBIT_EXECUTION_STATUS(..) => ORBIT_EXECUTION_STATUS_DATA::NAME,
35198            Self::PARAM_EXT_ACK(..) => PARAM_EXT_ACK_DATA::NAME,
35199            Self::PARAM_EXT_REQUEST_LIST(..) => PARAM_EXT_REQUEST_LIST_DATA::NAME,
35200            Self::PARAM_EXT_REQUEST_READ(..) => PARAM_EXT_REQUEST_READ_DATA::NAME,
35201            Self::PARAM_EXT_SET(..) => PARAM_EXT_SET_DATA::NAME,
35202            Self::PARAM_EXT_VALUE(..) => PARAM_EXT_VALUE_DATA::NAME,
35203            Self::PARAM_MAP_RC(..) => PARAM_MAP_RC_DATA::NAME,
35204            Self::PARAM_REQUEST_LIST(..) => PARAM_REQUEST_LIST_DATA::NAME,
35205            Self::PARAM_REQUEST_READ(..) => PARAM_REQUEST_READ_DATA::NAME,
35206            Self::PARAM_SET(..) => PARAM_SET_DATA::NAME,
35207            Self::PARAM_VALUE(..) => PARAM_VALUE_DATA::NAME,
35208            Self::PING(..) => PING_DATA::NAME,
35209            Self::PLAY_TUNE(..) => PLAY_TUNE_DATA::NAME,
35210            Self::PLAY_TUNE_V2(..) => PLAY_TUNE_V2_DATA::NAME,
35211            Self::POSITION_TARGET_GLOBAL_INT(..) => POSITION_TARGET_GLOBAL_INT_DATA::NAME,
35212            Self::POSITION_TARGET_LOCAL_NED(..) => POSITION_TARGET_LOCAL_NED_DATA::NAME,
35213            Self::POWER_STATUS(..) => POWER_STATUS_DATA::NAME,
35214            Self::PROTOCOL_VERSION(..) => PROTOCOL_VERSION_DATA::NAME,
35215            Self::RADIO_STATUS(..) => RADIO_STATUS_DATA::NAME,
35216            Self::RAW_IMU(..) => RAW_IMU_DATA::NAME,
35217            Self::RAW_PRESSURE(..) => RAW_PRESSURE_DATA::NAME,
35218            Self::RAW_RPM(..) => RAW_RPM_DATA::NAME,
35219            Self::RC_CHANNELS(..) => RC_CHANNELS_DATA::NAME,
35220            Self::RC_CHANNELS_OVERRIDE(..) => RC_CHANNELS_OVERRIDE_DATA::NAME,
35221            Self::RC_CHANNELS_RAW(..) => RC_CHANNELS_RAW_DATA::NAME,
35222            Self::RC_CHANNELS_SCALED(..) => RC_CHANNELS_SCALED_DATA::NAME,
35223            Self::REQUEST_DATA_STREAM(..) => REQUEST_DATA_STREAM_DATA::NAME,
35224            Self::REQUEST_EVENT(..) => REQUEST_EVENT_DATA::NAME,
35225            Self::RESOURCE_REQUEST(..) => RESOURCE_REQUEST_DATA::NAME,
35226            Self::RESPONSE_EVENT_ERROR(..) => RESPONSE_EVENT_ERROR_DATA::NAME,
35227            Self::SAFETY_ALLOWED_AREA(..) => SAFETY_ALLOWED_AREA_DATA::NAME,
35228            Self::SAFETY_SET_ALLOWED_AREA(..) => SAFETY_SET_ALLOWED_AREA_DATA::NAME,
35229            Self::SATCOM_LINK_STATUS(..) => SATCOM_LINK_STATUS_DATA::NAME,
35230            Self::SCALED_IMU(..) => SCALED_IMU_DATA::NAME,
35231            Self::SCALED_IMU2(..) => SCALED_IMU2_DATA::NAME,
35232            Self::SCALED_IMU3(..) => SCALED_IMU3_DATA::NAME,
35233            Self::SCALED_PRESSURE(..) => SCALED_PRESSURE_DATA::NAME,
35234            Self::SCALED_PRESSURE2(..) => SCALED_PRESSURE2_DATA::NAME,
35235            Self::SCALED_PRESSURE3(..) => SCALED_PRESSURE3_DATA::NAME,
35236            Self::SENSORPOD_STATUS(..) => SENSORPOD_STATUS_DATA::NAME,
35237            Self::SENSOR_AIRFLOW_ANGLES(..) => SENSOR_AIRFLOW_ANGLES_DATA::NAME,
35238            Self::SENS_ATMOS(..) => SENS_ATMOS_DATA::NAME,
35239            Self::SENS_BATMON(..) => SENS_BATMON_DATA::NAME,
35240            Self::SENS_MPPT(..) => SENS_MPPT_DATA::NAME,
35241            Self::SENS_POWER(..) => SENS_POWER_DATA::NAME,
35242            Self::SENS_POWER_BOARD(..) => SENS_POWER_BOARD_DATA::NAME,
35243            Self::SERIAL_CONTROL(..) => SERIAL_CONTROL_DATA::NAME,
35244            Self::SERVO_OUTPUT_RAW(..) => SERVO_OUTPUT_RAW_DATA::NAME,
35245            Self::SETUP_SIGNING(..) => SETUP_SIGNING_DATA::NAME,
35246            Self::SET_ACTUATOR_CONTROL_TARGET(..) => SET_ACTUATOR_CONTROL_TARGET_DATA::NAME,
35247            Self::SET_ATTITUDE_TARGET(..) => SET_ATTITUDE_TARGET_DATA::NAME,
35248            Self::SET_GPS_GLOBAL_ORIGIN(..) => SET_GPS_GLOBAL_ORIGIN_DATA::NAME,
35249            Self::SET_HOME_POSITION(..) => SET_HOME_POSITION_DATA::NAME,
35250            Self::SET_MODE(..) => SET_MODE_DATA::NAME,
35251            Self::SET_POSITION_TARGET_GLOBAL_INT(..) => SET_POSITION_TARGET_GLOBAL_INT_DATA::NAME,
35252            Self::SET_POSITION_TARGET_LOCAL_NED(..) => SET_POSITION_TARGET_LOCAL_NED_DATA::NAME,
35253            Self::SIM_STATE(..) => SIM_STATE_DATA::NAME,
35254            Self::SMART_BATTERY_INFO(..) => SMART_BATTERY_INFO_DATA::NAME,
35255            Self::STATUSTEXT(..) => STATUSTEXT_DATA::NAME,
35256            Self::STORAGE_INFORMATION(..) => STORAGE_INFORMATION_DATA::NAME,
35257            Self::SUPPORTED_TUNES(..) => SUPPORTED_TUNES_DATA::NAME,
35258            Self::SYSTEM_TIME(..) => SYSTEM_TIME_DATA::NAME,
35259            Self::SYS_STATUS(..) => SYS_STATUS_DATA::NAME,
35260            Self::TERRAIN_CHECK(..) => TERRAIN_CHECK_DATA::NAME,
35261            Self::TERRAIN_DATA(..) => TERRAIN_DATA_DATA::NAME,
35262            Self::TERRAIN_REPORT(..) => TERRAIN_REPORT_DATA::NAME,
35263            Self::TERRAIN_REQUEST(..) => TERRAIN_REQUEST_DATA::NAME,
35264            Self::TIMESYNC(..) => TIMESYNC_DATA::NAME,
35265            Self::TIME_ESTIMATE_TO_TARGET(..) => TIME_ESTIMATE_TO_TARGET_DATA::NAME,
35266            Self::TRAJECTORY_REPRESENTATION_BEZIER(..) => {
35267                TRAJECTORY_REPRESENTATION_BEZIER_DATA::NAME
35268            }
35269            Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(..) => {
35270                TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::NAME
35271            }
35272            Self::TUNNEL(..) => TUNNEL_DATA::NAME,
35273            Self::UAVCAN_NODE_INFO(..) => UAVCAN_NODE_INFO_DATA::NAME,
35274            Self::UAVCAN_NODE_STATUS(..) => UAVCAN_NODE_STATUS_DATA::NAME,
35275            Self::UTM_GLOBAL_POSITION(..) => UTM_GLOBAL_POSITION_DATA::NAME,
35276            Self::V2_EXTENSION(..) => V2_EXTENSION_DATA::NAME,
35277            Self::VFR_HUD(..) => VFR_HUD_DATA::NAME,
35278            Self::VIBRATION(..) => VIBRATION_DATA::NAME,
35279            Self::VICON_POSITION_ESTIMATE(..) => VICON_POSITION_ESTIMATE_DATA::NAME,
35280            Self::VIDEO_STREAM_INFORMATION(..) => VIDEO_STREAM_INFORMATION_DATA::NAME,
35281            Self::VIDEO_STREAM_STATUS(..) => VIDEO_STREAM_STATUS_DATA::NAME,
35282            Self::VISION_POSITION_ESTIMATE(..) => VISION_POSITION_ESTIMATE_DATA::NAME,
35283            Self::VISION_SPEED_ESTIMATE(..) => VISION_SPEED_ESTIMATE_DATA::NAME,
35284            Self::WHEEL_DISTANCE(..) => WHEEL_DISTANCE_DATA::NAME,
35285            Self::WIFI_CONFIG_AP(..) => WIFI_CONFIG_AP_DATA::NAME,
35286            Self::WINCH_STATUS(..) => WINCH_STATUS_DATA::NAME,
35287            Self::WIND_COV(..) => WIND_COV_DATA::NAME,
35288        }
35289    }
35290    fn message_id(&self) -> u32 {
35291        match self {
35292            Self::ACTUATOR_CONTROL_TARGET(..) => ACTUATOR_CONTROL_TARGET_DATA::ID,
35293            Self::ACTUATOR_OUTPUT_STATUS(..) => ACTUATOR_OUTPUT_STATUS_DATA::ID,
35294            Self::ADSB_VEHICLE(..) => ADSB_VEHICLE_DATA::ID,
35295            Self::AIS_VESSEL(..) => AIS_VESSEL_DATA::ID,
35296            Self::ALTITUDE(..) => ALTITUDE_DATA::ID,
35297            Self::ASLCTRL_DATA(..) => ASLCTRL_DATA_DATA::ID,
35298            Self::ASLCTRL_DEBUG(..) => ASLCTRL_DEBUG_DATA::ID,
35299            Self::ASLUAV_STATUS(..) => ASLUAV_STATUS_DATA::ID,
35300            Self::ASL_OBCTRL(..) => ASL_OBCTRL_DATA::ID,
35301            Self::ATTITUDE(..) => ATTITUDE_DATA::ID,
35302            Self::ATTITUDE_QUATERNION(..) => ATTITUDE_QUATERNION_DATA::ID,
35303            Self::ATTITUDE_QUATERNION_COV(..) => ATTITUDE_QUATERNION_COV_DATA::ID,
35304            Self::ATTITUDE_TARGET(..) => ATTITUDE_TARGET_DATA::ID,
35305            Self::ATT_POS_MOCAP(..) => ATT_POS_MOCAP_DATA::ID,
35306            Self::AUTH_KEY(..) => AUTH_KEY_DATA::ID,
35307            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(..) => {
35308                AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID
35309            }
35310            Self::AUTOPILOT_VERSION(..) => AUTOPILOT_VERSION_DATA::ID,
35311            Self::AVAILABLE_MODES(..) => AVAILABLE_MODES_DATA::ID,
35312            Self::AVAILABLE_MODES_MONITOR(..) => AVAILABLE_MODES_MONITOR_DATA::ID,
35313            Self::BATTERY_INFO(..) => BATTERY_INFO_DATA::ID,
35314            Self::BATTERY_STATUS(..) => BATTERY_STATUS_DATA::ID,
35315            Self::BUTTON_CHANGE(..) => BUTTON_CHANGE_DATA::ID,
35316            Self::CAMERA_CAPTURE_STATUS(..) => CAMERA_CAPTURE_STATUS_DATA::ID,
35317            Self::CAMERA_FOV_STATUS(..) => CAMERA_FOV_STATUS_DATA::ID,
35318            Self::CAMERA_IMAGE_CAPTURED(..) => CAMERA_IMAGE_CAPTURED_DATA::ID,
35319            Self::CAMERA_INFORMATION(..) => CAMERA_INFORMATION_DATA::ID,
35320            Self::CAMERA_SETTINGS(..) => CAMERA_SETTINGS_DATA::ID,
35321            Self::CAMERA_THERMAL_RANGE(..) => CAMERA_THERMAL_RANGE_DATA::ID,
35322            Self::CAMERA_TRACKING_GEO_STATUS(..) => CAMERA_TRACKING_GEO_STATUS_DATA::ID,
35323            Self::CAMERA_TRACKING_IMAGE_STATUS(..) => CAMERA_TRACKING_IMAGE_STATUS_DATA::ID,
35324            Self::CAMERA_TRIGGER(..) => CAMERA_TRIGGER_DATA::ID,
35325            Self::CANFD_FRAME(..) => CANFD_FRAME_DATA::ID,
35326            Self::CAN_FILTER_MODIFY(..) => CAN_FILTER_MODIFY_DATA::ID,
35327            Self::CAN_FRAME(..) => CAN_FRAME_DATA::ID,
35328            Self::CELLULAR_CONFIG(..) => CELLULAR_CONFIG_DATA::ID,
35329            Self::CELLULAR_STATUS(..) => CELLULAR_STATUS_DATA::ID,
35330            Self::CHANGE_OPERATOR_CONTROL(..) => CHANGE_OPERATOR_CONTROL_DATA::ID,
35331            Self::CHANGE_OPERATOR_CONTROL_ACK(..) => CHANGE_OPERATOR_CONTROL_ACK_DATA::ID,
35332            Self::COLLISION(..) => COLLISION_DATA::ID,
35333            Self::COMMAND_ACK(..) => COMMAND_ACK_DATA::ID,
35334            Self::COMMAND_CANCEL(..) => COMMAND_CANCEL_DATA::ID,
35335            Self::COMMAND_INT(..) => COMMAND_INT_DATA::ID,
35336            Self::COMMAND_INT_STAMPED(..) => COMMAND_INT_STAMPED_DATA::ID,
35337            Self::COMMAND_LONG(..) => COMMAND_LONG_DATA::ID,
35338            Self::COMMAND_LONG_STAMPED(..) => COMMAND_LONG_STAMPED_DATA::ID,
35339            Self::COMPONENT_INFORMATION(..) => COMPONENT_INFORMATION_DATA::ID,
35340            Self::COMPONENT_INFORMATION_BASIC(..) => COMPONENT_INFORMATION_BASIC_DATA::ID,
35341            Self::COMPONENT_METADATA(..) => COMPONENT_METADATA_DATA::ID,
35342            Self::CONTROL_SYSTEM_STATE(..) => CONTROL_SYSTEM_STATE_DATA::ID,
35343            Self::CURRENT_EVENT_SEQUENCE(..) => CURRENT_EVENT_SEQUENCE_DATA::ID,
35344            Self::CURRENT_MODE(..) => CURRENT_MODE_DATA::ID,
35345            Self::DATA_STREAM(..) => DATA_STREAM_DATA::ID,
35346            Self::DATA_TRANSMISSION_HANDSHAKE(..) => DATA_TRANSMISSION_HANDSHAKE_DATA::ID,
35347            Self::DEBUG(..) => DEBUG_DATA::ID,
35348            Self::DEBUG_FLOAT_ARRAY(..) => DEBUG_FLOAT_ARRAY_DATA::ID,
35349            Self::DEBUG_VECT(..) => DEBUG_VECT_DATA::ID,
35350            Self::DISTANCE_SENSOR(..) => DISTANCE_SENSOR_DATA::ID,
35351            Self::EFI_STATUS(..) => EFI_STATUS_DATA::ID,
35352            Self::EKF_EXT(..) => EKF_EXT_DATA::ID,
35353            Self::ENCAPSULATED_DATA(..) => ENCAPSULATED_DATA_DATA::ID,
35354            Self::ESC_INFO(..) => ESC_INFO_DATA::ID,
35355            Self::ESC_STATUS(..) => ESC_STATUS_DATA::ID,
35356            Self::ESTIMATOR_STATUS(..) => ESTIMATOR_STATUS_DATA::ID,
35357            Self::EVENT(..) => EVENT_DATA::ID,
35358            Self::EXTENDED_SYS_STATE(..) => EXTENDED_SYS_STATE_DATA::ID,
35359            Self::FENCE_STATUS(..) => FENCE_STATUS_DATA::ID,
35360            Self::FILE_TRANSFER_PROTOCOL(..) => FILE_TRANSFER_PROTOCOL_DATA::ID,
35361            Self::FLIGHT_INFORMATION(..) => FLIGHT_INFORMATION_DATA::ID,
35362            Self::FOLLOW_TARGET(..) => FOLLOW_TARGET_DATA::ID,
35363            Self::FUEL_STATUS(..) => FUEL_STATUS_DATA::ID,
35364            Self::FW_SOARING_DATA(..) => FW_SOARING_DATA_DATA::ID,
35365            Self::GENERATOR_STATUS(..) => GENERATOR_STATUS_DATA::ID,
35366            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(..) => GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID,
35367            Self::GIMBAL_DEVICE_INFORMATION(..) => GIMBAL_DEVICE_INFORMATION_DATA::ID,
35368            Self::GIMBAL_DEVICE_SET_ATTITUDE(..) => GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID,
35369            Self::GIMBAL_MANAGER_INFORMATION(..) => GIMBAL_MANAGER_INFORMATION_DATA::ID,
35370            Self::GIMBAL_MANAGER_SET_ATTITUDE(..) => GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID,
35371            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(..) => {
35372                GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID
35373            }
35374            Self::GIMBAL_MANAGER_SET_PITCHYAW(..) => GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID,
35375            Self::GIMBAL_MANAGER_STATUS(..) => GIMBAL_MANAGER_STATUS_DATA::ID,
35376            Self::GLOBAL_POSITION_INT(..) => GLOBAL_POSITION_INT_DATA::ID,
35377            Self::GLOBAL_POSITION_INT_COV(..) => GLOBAL_POSITION_INT_COV_DATA::ID,
35378            Self::GLOBAL_VISION_POSITION_ESTIMATE(..) => GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID,
35379            Self::GPS2_RAW(..) => GPS2_RAW_DATA::ID,
35380            Self::GPS2_RTK(..) => GPS2_RTK_DATA::ID,
35381            Self::GPS_GLOBAL_ORIGIN(..) => GPS_GLOBAL_ORIGIN_DATA::ID,
35382            Self::GPS_INJECT_DATA(..) => GPS_INJECT_DATA_DATA::ID,
35383            Self::GPS_INPUT(..) => GPS_INPUT_DATA::ID,
35384            Self::GPS_RAW_INT(..) => GPS_RAW_INT_DATA::ID,
35385            Self::GPS_RTCM_DATA(..) => GPS_RTCM_DATA_DATA::ID,
35386            Self::GPS_RTK(..) => GPS_RTK_DATA::ID,
35387            Self::GPS_STATUS(..) => GPS_STATUS_DATA::ID,
35388            Self::GSM_LINK_STATUS(..) => GSM_LINK_STATUS_DATA::ID,
35389            Self::HEARTBEAT(..) => HEARTBEAT_DATA::ID,
35390            Self::HIGHRES_IMU(..) => HIGHRES_IMU_DATA::ID,
35391            Self::HIGH_LATENCY(..) => HIGH_LATENCY_DATA::ID,
35392            Self::HIGH_LATENCY2(..) => HIGH_LATENCY2_DATA::ID,
35393            Self::HIL_ACTUATOR_CONTROLS(..) => HIL_ACTUATOR_CONTROLS_DATA::ID,
35394            Self::HIL_CONTROLS(..) => HIL_CONTROLS_DATA::ID,
35395            Self::HIL_GPS(..) => HIL_GPS_DATA::ID,
35396            Self::HIL_OPTICAL_FLOW(..) => HIL_OPTICAL_FLOW_DATA::ID,
35397            Self::HIL_RC_INPUTS_RAW(..) => HIL_RC_INPUTS_RAW_DATA::ID,
35398            Self::HIL_SENSOR(..) => HIL_SENSOR_DATA::ID,
35399            Self::HIL_STATE(..) => HIL_STATE_DATA::ID,
35400            Self::HIL_STATE_QUATERNION(..) => HIL_STATE_QUATERNION_DATA::ID,
35401            Self::HOME_POSITION(..) => HOME_POSITION_DATA::ID,
35402            Self::HYGROMETER_SENSOR(..) => HYGROMETER_SENSOR_DATA::ID,
35403            Self::ILLUMINATOR_STATUS(..) => ILLUMINATOR_STATUS_DATA::ID,
35404            Self::ISBD_LINK_STATUS(..) => ISBD_LINK_STATUS_DATA::ID,
35405            Self::LANDING_TARGET(..) => LANDING_TARGET_DATA::ID,
35406            Self::LINK_NODE_STATUS(..) => LINK_NODE_STATUS_DATA::ID,
35407            Self::LOCAL_POSITION_NED(..) => LOCAL_POSITION_NED_DATA::ID,
35408            Self::LOCAL_POSITION_NED_COV(..) => LOCAL_POSITION_NED_COV_DATA::ID,
35409            Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(..) => {
35410                LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID
35411            }
35412            Self::LOGGING_ACK(..) => LOGGING_ACK_DATA::ID,
35413            Self::LOGGING_DATA(..) => LOGGING_DATA_DATA::ID,
35414            Self::LOGGING_DATA_ACKED(..) => LOGGING_DATA_ACKED_DATA::ID,
35415            Self::LOG_DATA(..) => LOG_DATA_DATA::ID,
35416            Self::LOG_ENTRY(..) => LOG_ENTRY_DATA::ID,
35417            Self::LOG_ERASE(..) => LOG_ERASE_DATA::ID,
35418            Self::LOG_REQUEST_DATA(..) => LOG_REQUEST_DATA_DATA::ID,
35419            Self::LOG_REQUEST_END(..) => LOG_REQUEST_END_DATA::ID,
35420            Self::LOG_REQUEST_LIST(..) => LOG_REQUEST_LIST_DATA::ID,
35421            Self::MAG_CAL_REPORT(..) => MAG_CAL_REPORT_DATA::ID,
35422            Self::MANUAL_CONTROL(..) => MANUAL_CONTROL_DATA::ID,
35423            Self::MANUAL_SETPOINT(..) => MANUAL_SETPOINT_DATA::ID,
35424            Self::MEMORY_VECT(..) => MEMORY_VECT_DATA::ID,
35425            Self::MESSAGE_INTERVAL(..) => MESSAGE_INTERVAL_DATA::ID,
35426            Self::MISSION_ACK(..) => MISSION_ACK_DATA::ID,
35427            Self::MISSION_CLEAR_ALL(..) => MISSION_CLEAR_ALL_DATA::ID,
35428            Self::MISSION_COUNT(..) => MISSION_COUNT_DATA::ID,
35429            Self::MISSION_CURRENT(..) => MISSION_CURRENT_DATA::ID,
35430            Self::MISSION_ITEM(..) => MISSION_ITEM_DATA::ID,
35431            Self::MISSION_ITEM_INT(..) => MISSION_ITEM_INT_DATA::ID,
35432            Self::MISSION_ITEM_REACHED(..) => MISSION_ITEM_REACHED_DATA::ID,
35433            Self::MISSION_REQUEST(..) => MISSION_REQUEST_DATA::ID,
35434            Self::MISSION_REQUEST_INT(..) => MISSION_REQUEST_INT_DATA::ID,
35435            Self::MISSION_REQUEST_LIST(..) => MISSION_REQUEST_LIST_DATA::ID,
35436            Self::MISSION_REQUEST_PARTIAL_LIST(..) => MISSION_REQUEST_PARTIAL_LIST_DATA::ID,
35437            Self::MISSION_SET_CURRENT(..) => MISSION_SET_CURRENT_DATA::ID,
35438            Self::MISSION_WRITE_PARTIAL_LIST(..) => MISSION_WRITE_PARTIAL_LIST_DATA::ID,
35439            Self::MOUNT_ORIENTATION(..) => MOUNT_ORIENTATION_DATA::ID,
35440            Self::NAMED_VALUE_FLOAT(..) => NAMED_VALUE_FLOAT_DATA::ID,
35441            Self::NAMED_VALUE_INT(..) => NAMED_VALUE_INT_DATA::ID,
35442            Self::NAV_CONTROLLER_OUTPUT(..) => NAV_CONTROLLER_OUTPUT_DATA::ID,
35443            Self::OBSTACLE_DISTANCE(..) => OBSTACLE_DISTANCE_DATA::ID,
35444            Self::ODOMETRY(..) => ODOMETRY_DATA::ID,
35445            Self::ONBOARD_COMPUTER_STATUS(..) => ONBOARD_COMPUTER_STATUS_DATA::ID,
35446            Self::OPEN_DRONE_ID_ARM_STATUS(..) => OPEN_DRONE_ID_ARM_STATUS_DATA::ID,
35447            Self::OPEN_DRONE_ID_AUTHENTICATION(..) => OPEN_DRONE_ID_AUTHENTICATION_DATA::ID,
35448            Self::OPEN_DRONE_ID_BASIC_ID(..) => OPEN_DRONE_ID_BASIC_ID_DATA::ID,
35449            Self::OPEN_DRONE_ID_LOCATION(..) => OPEN_DRONE_ID_LOCATION_DATA::ID,
35450            Self::OPEN_DRONE_ID_MESSAGE_PACK(..) => OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID,
35451            Self::OPEN_DRONE_ID_OPERATOR_ID(..) => OPEN_DRONE_ID_OPERATOR_ID_DATA::ID,
35452            Self::OPEN_DRONE_ID_SELF_ID(..) => OPEN_DRONE_ID_SELF_ID_DATA::ID,
35453            Self::OPEN_DRONE_ID_SYSTEM(..) => OPEN_DRONE_ID_SYSTEM_DATA::ID,
35454            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(..) => OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID,
35455            Self::OPTICAL_FLOW(..) => OPTICAL_FLOW_DATA::ID,
35456            Self::OPTICAL_FLOW_RAD(..) => OPTICAL_FLOW_RAD_DATA::ID,
35457            Self::ORBIT_EXECUTION_STATUS(..) => ORBIT_EXECUTION_STATUS_DATA::ID,
35458            Self::PARAM_EXT_ACK(..) => PARAM_EXT_ACK_DATA::ID,
35459            Self::PARAM_EXT_REQUEST_LIST(..) => PARAM_EXT_REQUEST_LIST_DATA::ID,
35460            Self::PARAM_EXT_REQUEST_READ(..) => PARAM_EXT_REQUEST_READ_DATA::ID,
35461            Self::PARAM_EXT_SET(..) => PARAM_EXT_SET_DATA::ID,
35462            Self::PARAM_EXT_VALUE(..) => PARAM_EXT_VALUE_DATA::ID,
35463            Self::PARAM_MAP_RC(..) => PARAM_MAP_RC_DATA::ID,
35464            Self::PARAM_REQUEST_LIST(..) => PARAM_REQUEST_LIST_DATA::ID,
35465            Self::PARAM_REQUEST_READ(..) => PARAM_REQUEST_READ_DATA::ID,
35466            Self::PARAM_SET(..) => PARAM_SET_DATA::ID,
35467            Self::PARAM_VALUE(..) => PARAM_VALUE_DATA::ID,
35468            Self::PING(..) => PING_DATA::ID,
35469            Self::PLAY_TUNE(..) => PLAY_TUNE_DATA::ID,
35470            Self::PLAY_TUNE_V2(..) => PLAY_TUNE_V2_DATA::ID,
35471            Self::POSITION_TARGET_GLOBAL_INT(..) => POSITION_TARGET_GLOBAL_INT_DATA::ID,
35472            Self::POSITION_TARGET_LOCAL_NED(..) => POSITION_TARGET_LOCAL_NED_DATA::ID,
35473            Self::POWER_STATUS(..) => POWER_STATUS_DATA::ID,
35474            Self::PROTOCOL_VERSION(..) => PROTOCOL_VERSION_DATA::ID,
35475            Self::RADIO_STATUS(..) => RADIO_STATUS_DATA::ID,
35476            Self::RAW_IMU(..) => RAW_IMU_DATA::ID,
35477            Self::RAW_PRESSURE(..) => RAW_PRESSURE_DATA::ID,
35478            Self::RAW_RPM(..) => RAW_RPM_DATA::ID,
35479            Self::RC_CHANNELS(..) => RC_CHANNELS_DATA::ID,
35480            Self::RC_CHANNELS_OVERRIDE(..) => RC_CHANNELS_OVERRIDE_DATA::ID,
35481            Self::RC_CHANNELS_RAW(..) => RC_CHANNELS_RAW_DATA::ID,
35482            Self::RC_CHANNELS_SCALED(..) => RC_CHANNELS_SCALED_DATA::ID,
35483            Self::REQUEST_DATA_STREAM(..) => REQUEST_DATA_STREAM_DATA::ID,
35484            Self::REQUEST_EVENT(..) => REQUEST_EVENT_DATA::ID,
35485            Self::RESOURCE_REQUEST(..) => RESOURCE_REQUEST_DATA::ID,
35486            Self::RESPONSE_EVENT_ERROR(..) => RESPONSE_EVENT_ERROR_DATA::ID,
35487            Self::SAFETY_ALLOWED_AREA(..) => SAFETY_ALLOWED_AREA_DATA::ID,
35488            Self::SAFETY_SET_ALLOWED_AREA(..) => SAFETY_SET_ALLOWED_AREA_DATA::ID,
35489            Self::SATCOM_LINK_STATUS(..) => SATCOM_LINK_STATUS_DATA::ID,
35490            Self::SCALED_IMU(..) => SCALED_IMU_DATA::ID,
35491            Self::SCALED_IMU2(..) => SCALED_IMU2_DATA::ID,
35492            Self::SCALED_IMU3(..) => SCALED_IMU3_DATA::ID,
35493            Self::SCALED_PRESSURE(..) => SCALED_PRESSURE_DATA::ID,
35494            Self::SCALED_PRESSURE2(..) => SCALED_PRESSURE2_DATA::ID,
35495            Self::SCALED_PRESSURE3(..) => SCALED_PRESSURE3_DATA::ID,
35496            Self::SENSORPOD_STATUS(..) => SENSORPOD_STATUS_DATA::ID,
35497            Self::SENSOR_AIRFLOW_ANGLES(..) => SENSOR_AIRFLOW_ANGLES_DATA::ID,
35498            Self::SENS_ATMOS(..) => SENS_ATMOS_DATA::ID,
35499            Self::SENS_BATMON(..) => SENS_BATMON_DATA::ID,
35500            Self::SENS_MPPT(..) => SENS_MPPT_DATA::ID,
35501            Self::SENS_POWER(..) => SENS_POWER_DATA::ID,
35502            Self::SENS_POWER_BOARD(..) => SENS_POWER_BOARD_DATA::ID,
35503            Self::SERIAL_CONTROL(..) => SERIAL_CONTROL_DATA::ID,
35504            Self::SERVO_OUTPUT_RAW(..) => SERVO_OUTPUT_RAW_DATA::ID,
35505            Self::SETUP_SIGNING(..) => SETUP_SIGNING_DATA::ID,
35506            Self::SET_ACTUATOR_CONTROL_TARGET(..) => SET_ACTUATOR_CONTROL_TARGET_DATA::ID,
35507            Self::SET_ATTITUDE_TARGET(..) => SET_ATTITUDE_TARGET_DATA::ID,
35508            Self::SET_GPS_GLOBAL_ORIGIN(..) => SET_GPS_GLOBAL_ORIGIN_DATA::ID,
35509            Self::SET_HOME_POSITION(..) => SET_HOME_POSITION_DATA::ID,
35510            Self::SET_MODE(..) => SET_MODE_DATA::ID,
35511            Self::SET_POSITION_TARGET_GLOBAL_INT(..) => SET_POSITION_TARGET_GLOBAL_INT_DATA::ID,
35512            Self::SET_POSITION_TARGET_LOCAL_NED(..) => SET_POSITION_TARGET_LOCAL_NED_DATA::ID,
35513            Self::SIM_STATE(..) => SIM_STATE_DATA::ID,
35514            Self::SMART_BATTERY_INFO(..) => SMART_BATTERY_INFO_DATA::ID,
35515            Self::STATUSTEXT(..) => STATUSTEXT_DATA::ID,
35516            Self::STORAGE_INFORMATION(..) => STORAGE_INFORMATION_DATA::ID,
35517            Self::SUPPORTED_TUNES(..) => SUPPORTED_TUNES_DATA::ID,
35518            Self::SYSTEM_TIME(..) => SYSTEM_TIME_DATA::ID,
35519            Self::SYS_STATUS(..) => SYS_STATUS_DATA::ID,
35520            Self::TERRAIN_CHECK(..) => TERRAIN_CHECK_DATA::ID,
35521            Self::TERRAIN_DATA(..) => TERRAIN_DATA_DATA::ID,
35522            Self::TERRAIN_REPORT(..) => TERRAIN_REPORT_DATA::ID,
35523            Self::TERRAIN_REQUEST(..) => TERRAIN_REQUEST_DATA::ID,
35524            Self::TIMESYNC(..) => TIMESYNC_DATA::ID,
35525            Self::TIME_ESTIMATE_TO_TARGET(..) => TIME_ESTIMATE_TO_TARGET_DATA::ID,
35526            Self::TRAJECTORY_REPRESENTATION_BEZIER(..) => TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID,
35527            Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(..) => {
35528                TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID
35529            }
35530            Self::TUNNEL(..) => TUNNEL_DATA::ID,
35531            Self::UAVCAN_NODE_INFO(..) => UAVCAN_NODE_INFO_DATA::ID,
35532            Self::UAVCAN_NODE_STATUS(..) => UAVCAN_NODE_STATUS_DATA::ID,
35533            Self::UTM_GLOBAL_POSITION(..) => UTM_GLOBAL_POSITION_DATA::ID,
35534            Self::V2_EXTENSION(..) => V2_EXTENSION_DATA::ID,
35535            Self::VFR_HUD(..) => VFR_HUD_DATA::ID,
35536            Self::VIBRATION(..) => VIBRATION_DATA::ID,
35537            Self::VICON_POSITION_ESTIMATE(..) => VICON_POSITION_ESTIMATE_DATA::ID,
35538            Self::VIDEO_STREAM_INFORMATION(..) => VIDEO_STREAM_INFORMATION_DATA::ID,
35539            Self::VIDEO_STREAM_STATUS(..) => VIDEO_STREAM_STATUS_DATA::ID,
35540            Self::VISION_POSITION_ESTIMATE(..) => VISION_POSITION_ESTIMATE_DATA::ID,
35541            Self::VISION_SPEED_ESTIMATE(..) => VISION_SPEED_ESTIMATE_DATA::ID,
35542            Self::WHEEL_DISTANCE(..) => WHEEL_DISTANCE_DATA::ID,
35543            Self::WIFI_CONFIG_AP(..) => WIFI_CONFIG_AP_DATA::ID,
35544            Self::WINCH_STATUS(..) => WINCH_STATUS_DATA::ID,
35545            Self::WIND_COV(..) => WIND_COV_DATA::ID,
35546        }
35547    }
35548    fn message_id_from_name(name: &str) -> Option<u32> {
35549        match name {
35550            ACTUATOR_CONTROL_TARGET_DATA::NAME => Some(ACTUATOR_CONTROL_TARGET_DATA::ID),
35551            ACTUATOR_OUTPUT_STATUS_DATA::NAME => Some(ACTUATOR_OUTPUT_STATUS_DATA::ID),
35552            ADSB_VEHICLE_DATA::NAME => Some(ADSB_VEHICLE_DATA::ID),
35553            AIS_VESSEL_DATA::NAME => Some(AIS_VESSEL_DATA::ID),
35554            ALTITUDE_DATA::NAME => Some(ALTITUDE_DATA::ID),
35555            ASLCTRL_DATA_DATA::NAME => Some(ASLCTRL_DATA_DATA::ID),
35556            ASLCTRL_DEBUG_DATA::NAME => Some(ASLCTRL_DEBUG_DATA::ID),
35557            ASLUAV_STATUS_DATA::NAME => Some(ASLUAV_STATUS_DATA::ID),
35558            ASL_OBCTRL_DATA::NAME => Some(ASL_OBCTRL_DATA::ID),
35559            ATTITUDE_DATA::NAME => Some(ATTITUDE_DATA::ID),
35560            ATTITUDE_QUATERNION_DATA::NAME => Some(ATTITUDE_QUATERNION_DATA::ID),
35561            ATTITUDE_QUATERNION_COV_DATA::NAME => Some(ATTITUDE_QUATERNION_COV_DATA::ID),
35562            ATTITUDE_TARGET_DATA::NAME => Some(ATTITUDE_TARGET_DATA::ID),
35563            ATT_POS_MOCAP_DATA::NAME => Some(ATT_POS_MOCAP_DATA::ID),
35564            AUTH_KEY_DATA::NAME => Some(AUTH_KEY_DATA::ID),
35565            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::NAME => {
35566                Some(AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID)
35567            }
35568            AUTOPILOT_VERSION_DATA::NAME => Some(AUTOPILOT_VERSION_DATA::ID),
35569            AVAILABLE_MODES_DATA::NAME => Some(AVAILABLE_MODES_DATA::ID),
35570            AVAILABLE_MODES_MONITOR_DATA::NAME => Some(AVAILABLE_MODES_MONITOR_DATA::ID),
35571            BATTERY_INFO_DATA::NAME => Some(BATTERY_INFO_DATA::ID),
35572            BATTERY_STATUS_DATA::NAME => Some(BATTERY_STATUS_DATA::ID),
35573            BUTTON_CHANGE_DATA::NAME => Some(BUTTON_CHANGE_DATA::ID),
35574            CAMERA_CAPTURE_STATUS_DATA::NAME => Some(CAMERA_CAPTURE_STATUS_DATA::ID),
35575            CAMERA_FOV_STATUS_DATA::NAME => Some(CAMERA_FOV_STATUS_DATA::ID),
35576            CAMERA_IMAGE_CAPTURED_DATA::NAME => Some(CAMERA_IMAGE_CAPTURED_DATA::ID),
35577            CAMERA_INFORMATION_DATA::NAME => Some(CAMERA_INFORMATION_DATA::ID),
35578            CAMERA_SETTINGS_DATA::NAME => Some(CAMERA_SETTINGS_DATA::ID),
35579            CAMERA_THERMAL_RANGE_DATA::NAME => Some(CAMERA_THERMAL_RANGE_DATA::ID),
35580            CAMERA_TRACKING_GEO_STATUS_DATA::NAME => Some(CAMERA_TRACKING_GEO_STATUS_DATA::ID),
35581            CAMERA_TRACKING_IMAGE_STATUS_DATA::NAME => Some(CAMERA_TRACKING_IMAGE_STATUS_DATA::ID),
35582            CAMERA_TRIGGER_DATA::NAME => Some(CAMERA_TRIGGER_DATA::ID),
35583            CANFD_FRAME_DATA::NAME => Some(CANFD_FRAME_DATA::ID),
35584            CAN_FILTER_MODIFY_DATA::NAME => Some(CAN_FILTER_MODIFY_DATA::ID),
35585            CAN_FRAME_DATA::NAME => Some(CAN_FRAME_DATA::ID),
35586            CELLULAR_CONFIG_DATA::NAME => Some(CELLULAR_CONFIG_DATA::ID),
35587            CELLULAR_STATUS_DATA::NAME => Some(CELLULAR_STATUS_DATA::ID),
35588            CHANGE_OPERATOR_CONTROL_DATA::NAME => Some(CHANGE_OPERATOR_CONTROL_DATA::ID),
35589            CHANGE_OPERATOR_CONTROL_ACK_DATA::NAME => Some(CHANGE_OPERATOR_CONTROL_ACK_DATA::ID),
35590            COLLISION_DATA::NAME => Some(COLLISION_DATA::ID),
35591            COMMAND_ACK_DATA::NAME => Some(COMMAND_ACK_DATA::ID),
35592            COMMAND_CANCEL_DATA::NAME => Some(COMMAND_CANCEL_DATA::ID),
35593            COMMAND_INT_DATA::NAME => Some(COMMAND_INT_DATA::ID),
35594            COMMAND_INT_STAMPED_DATA::NAME => Some(COMMAND_INT_STAMPED_DATA::ID),
35595            COMMAND_LONG_DATA::NAME => Some(COMMAND_LONG_DATA::ID),
35596            COMMAND_LONG_STAMPED_DATA::NAME => Some(COMMAND_LONG_STAMPED_DATA::ID),
35597            COMPONENT_INFORMATION_DATA::NAME => Some(COMPONENT_INFORMATION_DATA::ID),
35598            COMPONENT_INFORMATION_BASIC_DATA::NAME => Some(COMPONENT_INFORMATION_BASIC_DATA::ID),
35599            COMPONENT_METADATA_DATA::NAME => Some(COMPONENT_METADATA_DATA::ID),
35600            CONTROL_SYSTEM_STATE_DATA::NAME => Some(CONTROL_SYSTEM_STATE_DATA::ID),
35601            CURRENT_EVENT_SEQUENCE_DATA::NAME => Some(CURRENT_EVENT_SEQUENCE_DATA::ID),
35602            CURRENT_MODE_DATA::NAME => Some(CURRENT_MODE_DATA::ID),
35603            DATA_STREAM_DATA::NAME => Some(DATA_STREAM_DATA::ID),
35604            DATA_TRANSMISSION_HANDSHAKE_DATA::NAME => Some(DATA_TRANSMISSION_HANDSHAKE_DATA::ID),
35605            DEBUG_DATA::NAME => Some(DEBUG_DATA::ID),
35606            DEBUG_FLOAT_ARRAY_DATA::NAME => Some(DEBUG_FLOAT_ARRAY_DATA::ID),
35607            DEBUG_VECT_DATA::NAME => Some(DEBUG_VECT_DATA::ID),
35608            DISTANCE_SENSOR_DATA::NAME => Some(DISTANCE_SENSOR_DATA::ID),
35609            EFI_STATUS_DATA::NAME => Some(EFI_STATUS_DATA::ID),
35610            EKF_EXT_DATA::NAME => Some(EKF_EXT_DATA::ID),
35611            ENCAPSULATED_DATA_DATA::NAME => Some(ENCAPSULATED_DATA_DATA::ID),
35612            ESC_INFO_DATA::NAME => Some(ESC_INFO_DATA::ID),
35613            ESC_STATUS_DATA::NAME => Some(ESC_STATUS_DATA::ID),
35614            ESTIMATOR_STATUS_DATA::NAME => Some(ESTIMATOR_STATUS_DATA::ID),
35615            EVENT_DATA::NAME => Some(EVENT_DATA::ID),
35616            EXTENDED_SYS_STATE_DATA::NAME => Some(EXTENDED_SYS_STATE_DATA::ID),
35617            FENCE_STATUS_DATA::NAME => Some(FENCE_STATUS_DATA::ID),
35618            FILE_TRANSFER_PROTOCOL_DATA::NAME => Some(FILE_TRANSFER_PROTOCOL_DATA::ID),
35619            FLIGHT_INFORMATION_DATA::NAME => Some(FLIGHT_INFORMATION_DATA::ID),
35620            FOLLOW_TARGET_DATA::NAME => Some(FOLLOW_TARGET_DATA::ID),
35621            FUEL_STATUS_DATA::NAME => Some(FUEL_STATUS_DATA::ID),
35622            FW_SOARING_DATA_DATA::NAME => Some(FW_SOARING_DATA_DATA::ID),
35623            GENERATOR_STATUS_DATA::NAME => Some(GENERATOR_STATUS_DATA::ID),
35624            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::NAME => {
35625                Some(GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID)
35626            }
35627            GIMBAL_DEVICE_INFORMATION_DATA::NAME => Some(GIMBAL_DEVICE_INFORMATION_DATA::ID),
35628            GIMBAL_DEVICE_SET_ATTITUDE_DATA::NAME => Some(GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID),
35629            GIMBAL_MANAGER_INFORMATION_DATA::NAME => Some(GIMBAL_MANAGER_INFORMATION_DATA::ID),
35630            GIMBAL_MANAGER_SET_ATTITUDE_DATA::NAME => Some(GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID),
35631            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::NAME => {
35632                Some(GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID)
35633            }
35634            GIMBAL_MANAGER_SET_PITCHYAW_DATA::NAME => Some(GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID),
35635            GIMBAL_MANAGER_STATUS_DATA::NAME => Some(GIMBAL_MANAGER_STATUS_DATA::ID),
35636            GLOBAL_POSITION_INT_DATA::NAME => Some(GLOBAL_POSITION_INT_DATA::ID),
35637            GLOBAL_POSITION_INT_COV_DATA::NAME => Some(GLOBAL_POSITION_INT_COV_DATA::ID),
35638            GLOBAL_VISION_POSITION_ESTIMATE_DATA::NAME => {
35639                Some(GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID)
35640            }
35641            GPS2_RAW_DATA::NAME => Some(GPS2_RAW_DATA::ID),
35642            GPS2_RTK_DATA::NAME => Some(GPS2_RTK_DATA::ID),
35643            GPS_GLOBAL_ORIGIN_DATA::NAME => Some(GPS_GLOBAL_ORIGIN_DATA::ID),
35644            GPS_INJECT_DATA_DATA::NAME => Some(GPS_INJECT_DATA_DATA::ID),
35645            GPS_INPUT_DATA::NAME => Some(GPS_INPUT_DATA::ID),
35646            GPS_RAW_INT_DATA::NAME => Some(GPS_RAW_INT_DATA::ID),
35647            GPS_RTCM_DATA_DATA::NAME => Some(GPS_RTCM_DATA_DATA::ID),
35648            GPS_RTK_DATA::NAME => Some(GPS_RTK_DATA::ID),
35649            GPS_STATUS_DATA::NAME => Some(GPS_STATUS_DATA::ID),
35650            GSM_LINK_STATUS_DATA::NAME => Some(GSM_LINK_STATUS_DATA::ID),
35651            HEARTBEAT_DATA::NAME => Some(HEARTBEAT_DATA::ID),
35652            HIGHRES_IMU_DATA::NAME => Some(HIGHRES_IMU_DATA::ID),
35653            HIGH_LATENCY_DATA::NAME => Some(HIGH_LATENCY_DATA::ID),
35654            HIGH_LATENCY2_DATA::NAME => Some(HIGH_LATENCY2_DATA::ID),
35655            HIL_ACTUATOR_CONTROLS_DATA::NAME => Some(HIL_ACTUATOR_CONTROLS_DATA::ID),
35656            HIL_CONTROLS_DATA::NAME => Some(HIL_CONTROLS_DATA::ID),
35657            HIL_GPS_DATA::NAME => Some(HIL_GPS_DATA::ID),
35658            HIL_OPTICAL_FLOW_DATA::NAME => Some(HIL_OPTICAL_FLOW_DATA::ID),
35659            HIL_RC_INPUTS_RAW_DATA::NAME => Some(HIL_RC_INPUTS_RAW_DATA::ID),
35660            HIL_SENSOR_DATA::NAME => Some(HIL_SENSOR_DATA::ID),
35661            HIL_STATE_DATA::NAME => Some(HIL_STATE_DATA::ID),
35662            HIL_STATE_QUATERNION_DATA::NAME => Some(HIL_STATE_QUATERNION_DATA::ID),
35663            HOME_POSITION_DATA::NAME => Some(HOME_POSITION_DATA::ID),
35664            HYGROMETER_SENSOR_DATA::NAME => Some(HYGROMETER_SENSOR_DATA::ID),
35665            ILLUMINATOR_STATUS_DATA::NAME => Some(ILLUMINATOR_STATUS_DATA::ID),
35666            ISBD_LINK_STATUS_DATA::NAME => Some(ISBD_LINK_STATUS_DATA::ID),
35667            LANDING_TARGET_DATA::NAME => Some(LANDING_TARGET_DATA::ID),
35668            LINK_NODE_STATUS_DATA::NAME => Some(LINK_NODE_STATUS_DATA::ID),
35669            LOCAL_POSITION_NED_DATA::NAME => Some(LOCAL_POSITION_NED_DATA::ID),
35670            LOCAL_POSITION_NED_COV_DATA::NAME => Some(LOCAL_POSITION_NED_COV_DATA::ID),
35671            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::NAME => {
35672                Some(LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID)
35673            }
35674            LOGGING_ACK_DATA::NAME => Some(LOGGING_ACK_DATA::ID),
35675            LOGGING_DATA_DATA::NAME => Some(LOGGING_DATA_DATA::ID),
35676            LOGGING_DATA_ACKED_DATA::NAME => Some(LOGGING_DATA_ACKED_DATA::ID),
35677            LOG_DATA_DATA::NAME => Some(LOG_DATA_DATA::ID),
35678            LOG_ENTRY_DATA::NAME => Some(LOG_ENTRY_DATA::ID),
35679            LOG_ERASE_DATA::NAME => Some(LOG_ERASE_DATA::ID),
35680            LOG_REQUEST_DATA_DATA::NAME => Some(LOG_REQUEST_DATA_DATA::ID),
35681            LOG_REQUEST_END_DATA::NAME => Some(LOG_REQUEST_END_DATA::ID),
35682            LOG_REQUEST_LIST_DATA::NAME => Some(LOG_REQUEST_LIST_DATA::ID),
35683            MAG_CAL_REPORT_DATA::NAME => Some(MAG_CAL_REPORT_DATA::ID),
35684            MANUAL_CONTROL_DATA::NAME => Some(MANUAL_CONTROL_DATA::ID),
35685            MANUAL_SETPOINT_DATA::NAME => Some(MANUAL_SETPOINT_DATA::ID),
35686            MEMORY_VECT_DATA::NAME => Some(MEMORY_VECT_DATA::ID),
35687            MESSAGE_INTERVAL_DATA::NAME => Some(MESSAGE_INTERVAL_DATA::ID),
35688            MISSION_ACK_DATA::NAME => Some(MISSION_ACK_DATA::ID),
35689            MISSION_CLEAR_ALL_DATA::NAME => Some(MISSION_CLEAR_ALL_DATA::ID),
35690            MISSION_COUNT_DATA::NAME => Some(MISSION_COUNT_DATA::ID),
35691            MISSION_CURRENT_DATA::NAME => Some(MISSION_CURRENT_DATA::ID),
35692            MISSION_ITEM_DATA::NAME => Some(MISSION_ITEM_DATA::ID),
35693            MISSION_ITEM_INT_DATA::NAME => Some(MISSION_ITEM_INT_DATA::ID),
35694            MISSION_ITEM_REACHED_DATA::NAME => Some(MISSION_ITEM_REACHED_DATA::ID),
35695            MISSION_REQUEST_DATA::NAME => Some(MISSION_REQUEST_DATA::ID),
35696            MISSION_REQUEST_INT_DATA::NAME => Some(MISSION_REQUEST_INT_DATA::ID),
35697            MISSION_REQUEST_LIST_DATA::NAME => Some(MISSION_REQUEST_LIST_DATA::ID),
35698            MISSION_REQUEST_PARTIAL_LIST_DATA::NAME => Some(MISSION_REQUEST_PARTIAL_LIST_DATA::ID),
35699            MISSION_SET_CURRENT_DATA::NAME => Some(MISSION_SET_CURRENT_DATA::ID),
35700            MISSION_WRITE_PARTIAL_LIST_DATA::NAME => Some(MISSION_WRITE_PARTIAL_LIST_DATA::ID),
35701            MOUNT_ORIENTATION_DATA::NAME => Some(MOUNT_ORIENTATION_DATA::ID),
35702            NAMED_VALUE_FLOAT_DATA::NAME => Some(NAMED_VALUE_FLOAT_DATA::ID),
35703            NAMED_VALUE_INT_DATA::NAME => Some(NAMED_VALUE_INT_DATA::ID),
35704            NAV_CONTROLLER_OUTPUT_DATA::NAME => Some(NAV_CONTROLLER_OUTPUT_DATA::ID),
35705            OBSTACLE_DISTANCE_DATA::NAME => Some(OBSTACLE_DISTANCE_DATA::ID),
35706            ODOMETRY_DATA::NAME => Some(ODOMETRY_DATA::ID),
35707            ONBOARD_COMPUTER_STATUS_DATA::NAME => Some(ONBOARD_COMPUTER_STATUS_DATA::ID),
35708            OPEN_DRONE_ID_ARM_STATUS_DATA::NAME => Some(OPEN_DRONE_ID_ARM_STATUS_DATA::ID),
35709            OPEN_DRONE_ID_AUTHENTICATION_DATA::NAME => Some(OPEN_DRONE_ID_AUTHENTICATION_DATA::ID),
35710            OPEN_DRONE_ID_BASIC_ID_DATA::NAME => Some(OPEN_DRONE_ID_BASIC_ID_DATA::ID),
35711            OPEN_DRONE_ID_LOCATION_DATA::NAME => Some(OPEN_DRONE_ID_LOCATION_DATA::ID),
35712            OPEN_DRONE_ID_MESSAGE_PACK_DATA::NAME => Some(OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID),
35713            OPEN_DRONE_ID_OPERATOR_ID_DATA::NAME => Some(OPEN_DRONE_ID_OPERATOR_ID_DATA::ID),
35714            OPEN_DRONE_ID_SELF_ID_DATA::NAME => Some(OPEN_DRONE_ID_SELF_ID_DATA::ID),
35715            OPEN_DRONE_ID_SYSTEM_DATA::NAME => Some(OPEN_DRONE_ID_SYSTEM_DATA::ID),
35716            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::NAME => Some(OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID),
35717            OPTICAL_FLOW_DATA::NAME => Some(OPTICAL_FLOW_DATA::ID),
35718            OPTICAL_FLOW_RAD_DATA::NAME => Some(OPTICAL_FLOW_RAD_DATA::ID),
35719            ORBIT_EXECUTION_STATUS_DATA::NAME => Some(ORBIT_EXECUTION_STATUS_DATA::ID),
35720            PARAM_EXT_ACK_DATA::NAME => Some(PARAM_EXT_ACK_DATA::ID),
35721            PARAM_EXT_REQUEST_LIST_DATA::NAME => Some(PARAM_EXT_REQUEST_LIST_DATA::ID),
35722            PARAM_EXT_REQUEST_READ_DATA::NAME => Some(PARAM_EXT_REQUEST_READ_DATA::ID),
35723            PARAM_EXT_SET_DATA::NAME => Some(PARAM_EXT_SET_DATA::ID),
35724            PARAM_EXT_VALUE_DATA::NAME => Some(PARAM_EXT_VALUE_DATA::ID),
35725            PARAM_MAP_RC_DATA::NAME => Some(PARAM_MAP_RC_DATA::ID),
35726            PARAM_REQUEST_LIST_DATA::NAME => Some(PARAM_REQUEST_LIST_DATA::ID),
35727            PARAM_REQUEST_READ_DATA::NAME => Some(PARAM_REQUEST_READ_DATA::ID),
35728            PARAM_SET_DATA::NAME => Some(PARAM_SET_DATA::ID),
35729            PARAM_VALUE_DATA::NAME => Some(PARAM_VALUE_DATA::ID),
35730            PING_DATA::NAME => Some(PING_DATA::ID),
35731            PLAY_TUNE_DATA::NAME => Some(PLAY_TUNE_DATA::ID),
35732            PLAY_TUNE_V2_DATA::NAME => Some(PLAY_TUNE_V2_DATA::ID),
35733            POSITION_TARGET_GLOBAL_INT_DATA::NAME => Some(POSITION_TARGET_GLOBAL_INT_DATA::ID),
35734            POSITION_TARGET_LOCAL_NED_DATA::NAME => Some(POSITION_TARGET_LOCAL_NED_DATA::ID),
35735            POWER_STATUS_DATA::NAME => Some(POWER_STATUS_DATA::ID),
35736            PROTOCOL_VERSION_DATA::NAME => Some(PROTOCOL_VERSION_DATA::ID),
35737            RADIO_STATUS_DATA::NAME => Some(RADIO_STATUS_DATA::ID),
35738            RAW_IMU_DATA::NAME => Some(RAW_IMU_DATA::ID),
35739            RAW_PRESSURE_DATA::NAME => Some(RAW_PRESSURE_DATA::ID),
35740            RAW_RPM_DATA::NAME => Some(RAW_RPM_DATA::ID),
35741            RC_CHANNELS_DATA::NAME => Some(RC_CHANNELS_DATA::ID),
35742            RC_CHANNELS_OVERRIDE_DATA::NAME => Some(RC_CHANNELS_OVERRIDE_DATA::ID),
35743            RC_CHANNELS_RAW_DATA::NAME => Some(RC_CHANNELS_RAW_DATA::ID),
35744            RC_CHANNELS_SCALED_DATA::NAME => Some(RC_CHANNELS_SCALED_DATA::ID),
35745            REQUEST_DATA_STREAM_DATA::NAME => Some(REQUEST_DATA_STREAM_DATA::ID),
35746            REQUEST_EVENT_DATA::NAME => Some(REQUEST_EVENT_DATA::ID),
35747            RESOURCE_REQUEST_DATA::NAME => Some(RESOURCE_REQUEST_DATA::ID),
35748            RESPONSE_EVENT_ERROR_DATA::NAME => Some(RESPONSE_EVENT_ERROR_DATA::ID),
35749            SAFETY_ALLOWED_AREA_DATA::NAME => Some(SAFETY_ALLOWED_AREA_DATA::ID),
35750            SAFETY_SET_ALLOWED_AREA_DATA::NAME => Some(SAFETY_SET_ALLOWED_AREA_DATA::ID),
35751            SATCOM_LINK_STATUS_DATA::NAME => Some(SATCOM_LINK_STATUS_DATA::ID),
35752            SCALED_IMU_DATA::NAME => Some(SCALED_IMU_DATA::ID),
35753            SCALED_IMU2_DATA::NAME => Some(SCALED_IMU2_DATA::ID),
35754            SCALED_IMU3_DATA::NAME => Some(SCALED_IMU3_DATA::ID),
35755            SCALED_PRESSURE_DATA::NAME => Some(SCALED_PRESSURE_DATA::ID),
35756            SCALED_PRESSURE2_DATA::NAME => Some(SCALED_PRESSURE2_DATA::ID),
35757            SCALED_PRESSURE3_DATA::NAME => Some(SCALED_PRESSURE3_DATA::ID),
35758            SENSORPOD_STATUS_DATA::NAME => Some(SENSORPOD_STATUS_DATA::ID),
35759            SENSOR_AIRFLOW_ANGLES_DATA::NAME => Some(SENSOR_AIRFLOW_ANGLES_DATA::ID),
35760            SENS_ATMOS_DATA::NAME => Some(SENS_ATMOS_DATA::ID),
35761            SENS_BATMON_DATA::NAME => Some(SENS_BATMON_DATA::ID),
35762            SENS_MPPT_DATA::NAME => Some(SENS_MPPT_DATA::ID),
35763            SENS_POWER_DATA::NAME => Some(SENS_POWER_DATA::ID),
35764            SENS_POWER_BOARD_DATA::NAME => Some(SENS_POWER_BOARD_DATA::ID),
35765            SERIAL_CONTROL_DATA::NAME => Some(SERIAL_CONTROL_DATA::ID),
35766            SERVO_OUTPUT_RAW_DATA::NAME => Some(SERVO_OUTPUT_RAW_DATA::ID),
35767            SETUP_SIGNING_DATA::NAME => Some(SETUP_SIGNING_DATA::ID),
35768            SET_ACTUATOR_CONTROL_TARGET_DATA::NAME => Some(SET_ACTUATOR_CONTROL_TARGET_DATA::ID),
35769            SET_ATTITUDE_TARGET_DATA::NAME => Some(SET_ATTITUDE_TARGET_DATA::ID),
35770            SET_GPS_GLOBAL_ORIGIN_DATA::NAME => Some(SET_GPS_GLOBAL_ORIGIN_DATA::ID),
35771            SET_HOME_POSITION_DATA::NAME => Some(SET_HOME_POSITION_DATA::ID),
35772            SET_MODE_DATA::NAME => Some(SET_MODE_DATA::ID),
35773            SET_POSITION_TARGET_GLOBAL_INT_DATA::NAME => {
35774                Some(SET_POSITION_TARGET_GLOBAL_INT_DATA::ID)
35775            }
35776            SET_POSITION_TARGET_LOCAL_NED_DATA::NAME => {
35777                Some(SET_POSITION_TARGET_LOCAL_NED_DATA::ID)
35778            }
35779            SIM_STATE_DATA::NAME => Some(SIM_STATE_DATA::ID),
35780            SMART_BATTERY_INFO_DATA::NAME => Some(SMART_BATTERY_INFO_DATA::ID),
35781            STATUSTEXT_DATA::NAME => Some(STATUSTEXT_DATA::ID),
35782            STORAGE_INFORMATION_DATA::NAME => Some(STORAGE_INFORMATION_DATA::ID),
35783            SUPPORTED_TUNES_DATA::NAME => Some(SUPPORTED_TUNES_DATA::ID),
35784            SYSTEM_TIME_DATA::NAME => Some(SYSTEM_TIME_DATA::ID),
35785            SYS_STATUS_DATA::NAME => Some(SYS_STATUS_DATA::ID),
35786            TERRAIN_CHECK_DATA::NAME => Some(TERRAIN_CHECK_DATA::ID),
35787            TERRAIN_DATA_DATA::NAME => Some(TERRAIN_DATA_DATA::ID),
35788            TERRAIN_REPORT_DATA::NAME => Some(TERRAIN_REPORT_DATA::ID),
35789            TERRAIN_REQUEST_DATA::NAME => Some(TERRAIN_REQUEST_DATA::ID),
35790            TIMESYNC_DATA::NAME => Some(TIMESYNC_DATA::ID),
35791            TIME_ESTIMATE_TO_TARGET_DATA::NAME => Some(TIME_ESTIMATE_TO_TARGET_DATA::ID),
35792            TRAJECTORY_REPRESENTATION_BEZIER_DATA::NAME => {
35793                Some(TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID)
35794            }
35795            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::NAME => {
35796                Some(TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID)
35797            }
35798            TUNNEL_DATA::NAME => Some(TUNNEL_DATA::ID),
35799            UAVCAN_NODE_INFO_DATA::NAME => Some(UAVCAN_NODE_INFO_DATA::ID),
35800            UAVCAN_NODE_STATUS_DATA::NAME => Some(UAVCAN_NODE_STATUS_DATA::ID),
35801            UTM_GLOBAL_POSITION_DATA::NAME => Some(UTM_GLOBAL_POSITION_DATA::ID),
35802            V2_EXTENSION_DATA::NAME => Some(V2_EXTENSION_DATA::ID),
35803            VFR_HUD_DATA::NAME => Some(VFR_HUD_DATA::ID),
35804            VIBRATION_DATA::NAME => Some(VIBRATION_DATA::ID),
35805            VICON_POSITION_ESTIMATE_DATA::NAME => Some(VICON_POSITION_ESTIMATE_DATA::ID),
35806            VIDEO_STREAM_INFORMATION_DATA::NAME => Some(VIDEO_STREAM_INFORMATION_DATA::ID),
35807            VIDEO_STREAM_STATUS_DATA::NAME => Some(VIDEO_STREAM_STATUS_DATA::ID),
35808            VISION_POSITION_ESTIMATE_DATA::NAME => Some(VISION_POSITION_ESTIMATE_DATA::ID),
35809            VISION_SPEED_ESTIMATE_DATA::NAME => Some(VISION_SPEED_ESTIMATE_DATA::ID),
35810            WHEEL_DISTANCE_DATA::NAME => Some(WHEEL_DISTANCE_DATA::ID),
35811            WIFI_CONFIG_AP_DATA::NAME => Some(WIFI_CONFIG_AP_DATA::ID),
35812            WINCH_STATUS_DATA::NAME => Some(WINCH_STATUS_DATA::ID),
35813            WIND_COV_DATA::NAME => Some(WIND_COV_DATA::ID),
35814            _ => None,
35815        }
35816    }
35817    fn default_message_from_id(id: u32) -> Option<Self> {
35818        match id {
35819            ACTUATOR_CONTROL_TARGET_DATA::ID => Some(Self::ACTUATOR_CONTROL_TARGET(
35820                ACTUATOR_CONTROL_TARGET_DATA::default(),
35821            )),
35822            ACTUATOR_OUTPUT_STATUS_DATA::ID => Some(Self::ACTUATOR_OUTPUT_STATUS(
35823                ACTUATOR_OUTPUT_STATUS_DATA::default(),
35824            )),
35825            ADSB_VEHICLE_DATA::ID => Some(Self::ADSB_VEHICLE(ADSB_VEHICLE_DATA::default())),
35826            AIS_VESSEL_DATA::ID => Some(Self::AIS_VESSEL(AIS_VESSEL_DATA::default())),
35827            ALTITUDE_DATA::ID => Some(Self::ALTITUDE(ALTITUDE_DATA::default())),
35828            ASLCTRL_DATA_DATA::ID => Some(Self::ASLCTRL_DATA(ASLCTRL_DATA_DATA::default())),
35829            ASLCTRL_DEBUG_DATA::ID => Some(Self::ASLCTRL_DEBUG(ASLCTRL_DEBUG_DATA::default())),
35830            ASLUAV_STATUS_DATA::ID => Some(Self::ASLUAV_STATUS(ASLUAV_STATUS_DATA::default())),
35831            ASL_OBCTRL_DATA::ID => Some(Self::ASL_OBCTRL(ASL_OBCTRL_DATA::default())),
35832            ATTITUDE_DATA::ID => Some(Self::ATTITUDE(ATTITUDE_DATA::default())),
35833            ATTITUDE_QUATERNION_DATA::ID => Some(Self::ATTITUDE_QUATERNION(
35834                ATTITUDE_QUATERNION_DATA::default(),
35835            )),
35836            ATTITUDE_QUATERNION_COV_DATA::ID => Some(Self::ATTITUDE_QUATERNION_COV(
35837                ATTITUDE_QUATERNION_COV_DATA::default(),
35838            )),
35839            ATTITUDE_TARGET_DATA::ID => {
35840                Some(Self::ATTITUDE_TARGET(ATTITUDE_TARGET_DATA::default()))
35841            }
35842            ATT_POS_MOCAP_DATA::ID => Some(Self::ATT_POS_MOCAP(ATT_POS_MOCAP_DATA::default())),
35843            AUTH_KEY_DATA::ID => Some(Self::AUTH_KEY(AUTH_KEY_DATA::default())),
35844            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID => {
35845                Some(Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(
35846                    AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::default(),
35847                ))
35848            }
35849            AUTOPILOT_VERSION_DATA::ID => {
35850                Some(Self::AUTOPILOT_VERSION(AUTOPILOT_VERSION_DATA::default()))
35851            }
35852            AVAILABLE_MODES_DATA::ID => {
35853                Some(Self::AVAILABLE_MODES(AVAILABLE_MODES_DATA::default()))
35854            }
35855            AVAILABLE_MODES_MONITOR_DATA::ID => Some(Self::AVAILABLE_MODES_MONITOR(
35856                AVAILABLE_MODES_MONITOR_DATA::default(),
35857            )),
35858            BATTERY_INFO_DATA::ID => Some(Self::BATTERY_INFO(BATTERY_INFO_DATA::default())),
35859            BATTERY_STATUS_DATA::ID => Some(Self::BATTERY_STATUS(BATTERY_STATUS_DATA::default())),
35860            BUTTON_CHANGE_DATA::ID => Some(Self::BUTTON_CHANGE(BUTTON_CHANGE_DATA::default())),
35861            CAMERA_CAPTURE_STATUS_DATA::ID => Some(Self::CAMERA_CAPTURE_STATUS(
35862                CAMERA_CAPTURE_STATUS_DATA::default(),
35863            )),
35864            CAMERA_FOV_STATUS_DATA::ID => {
35865                Some(Self::CAMERA_FOV_STATUS(CAMERA_FOV_STATUS_DATA::default()))
35866            }
35867            CAMERA_IMAGE_CAPTURED_DATA::ID => Some(Self::CAMERA_IMAGE_CAPTURED(
35868                CAMERA_IMAGE_CAPTURED_DATA::default(),
35869            )),
35870            CAMERA_INFORMATION_DATA::ID => {
35871                Some(Self::CAMERA_INFORMATION(CAMERA_INFORMATION_DATA::default()))
35872            }
35873            CAMERA_SETTINGS_DATA::ID => {
35874                Some(Self::CAMERA_SETTINGS(CAMERA_SETTINGS_DATA::default()))
35875            }
35876            CAMERA_THERMAL_RANGE_DATA::ID => Some(Self::CAMERA_THERMAL_RANGE(
35877                CAMERA_THERMAL_RANGE_DATA::default(),
35878            )),
35879            CAMERA_TRACKING_GEO_STATUS_DATA::ID => Some(Self::CAMERA_TRACKING_GEO_STATUS(
35880                CAMERA_TRACKING_GEO_STATUS_DATA::default(),
35881            )),
35882            CAMERA_TRACKING_IMAGE_STATUS_DATA::ID => Some(Self::CAMERA_TRACKING_IMAGE_STATUS(
35883                CAMERA_TRACKING_IMAGE_STATUS_DATA::default(),
35884            )),
35885            CAMERA_TRIGGER_DATA::ID => Some(Self::CAMERA_TRIGGER(CAMERA_TRIGGER_DATA::default())),
35886            CANFD_FRAME_DATA::ID => Some(Self::CANFD_FRAME(CANFD_FRAME_DATA::default())),
35887            CAN_FILTER_MODIFY_DATA::ID => {
35888                Some(Self::CAN_FILTER_MODIFY(CAN_FILTER_MODIFY_DATA::default()))
35889            }
35890            CAN_FRAME_DATA::ID => Some(Self::CAN_FRAME(CAN_FRAME_DATA::default())),
35891            CELLULAR_CONFIG_DATA::ID => {
35892                Some(Self::CELLULAR_CONFIG(CELLULAR_CONFIG_DATA::default()))
35893            }
35894            CELLULAR_STATUS_DATA::ID => {
35895                Some(Self::CELLULAR_STATUS(CELLULAR_STATUS_DATA::default()))
35896            }
35897            CHANGE_OPERATOR_CONTROL_DATA::ID => Some(Self::CHANGE_OPERATOR_CONTROL(
35898                CHANGE_OPERATOR_CONTROL_DATA::default(),
35899            )),
35900            CHANGE_OPERATOR_CONTROL_ACK_DATA::ID => Some(Self::CHANGE_OPERATOR_CONTROL_ACK(
35901                CHANGE_OPERATOR_CONTROL_ACK_DATA::default(),
35902            )),
35903            COLLISION_DATA::ID => Some(Self::COLLISION(COLLISION_DATA::default())),
35904            COMMAND_ACK_DATA::ID => Some(Self::COMMAND_ACK(COMMAND_ACK_DATA::default())),
35905            COMMAND_CANCEL_DATA::ID => Some(Self::COMMAND_CANCEL(COMMAND_CANCEL_DATA::default())),
35906            COMMAND_INT_DATA::ID => Some(Self::COMMAND_INT(COMMAND_INT_DATA::default())),
35907            COMMAND_INT_STAMPED_DATA::ID => Some(Self::COMMAND_INT_STAMPED(
35908                COMMAND_INT_STAMPED_DATA::default(),
35909            )),
35910            COMMAND_LONG_DATA::ID => Some(Self::COMMAND_LONG(COMMAND_LONG_DATA::default())),
35911            COMMAND_LONG_STAMPED_DATA::ID => Some(Self::COMMAND_LONG_STAMPED(
35912                COMMAND_LONG_STAMPED_DATA::default(),
35913            )),
35914            COMPONENT_INFORMATION_DATA::ID => Some(Self::COMPONENT_INFORMATION(
35915                COMPONENT_INFORMATION_DATA::default(),
35916            )),
35917            COMPONENT_INFORMATION_BASIC_DATA::ID => Some(Self::COMPONENT_INFORMATION_BASIC(
35918                COMPONENT_INFORMATION_BASIC_DATA::default(),
35919            )),
35920            COMPONENT_METADATA_DATA::ID => {
35921                Some(Self::COMPONENT_METADATA(COMPONENT_METADATA_DATA::default()))
35922            }
35923            CONTROL_SYSTEM_STATE_DATA::ID => Some(Self::CONTROL_SYSTEM_STATE(
35924                CONTROL_SYSTEM_STATE_DATA::default(),
35925            )),
35926            CURRENT_EVENT_SEQUENCE_DATA::ID => Some(Self::CURRENT_EVENT_SEQUENCE(
35927                CURRENT_EVENT_SEQUENCE_DATA::default(),
35928            )),
35929            CURRENT_MODE_DATA::ID => Some(Self::CURRENT_MODE(CURRENT_MODE_DATA::default())),
35930            DATA_STREAM_DATA::ID => Some(Self::DATA_STREAM(DATA_STREAM_DATA::default())),
35931            DATA_TRANSMISSION_HANDSHAKE_DATA::ID => Some(Self::DATA_TRANSMISSION_HANDSHAKE(
35932                DATA_TRANSMISSION_HANDSHAKE_DATA::default(),
35933            )),
35934            DEBUG_DATA::ID => Some(Self::DEBUG(DEBUG_DATA::default())),
35935            DEBUG_FLOAT_ARRAY_DATA::ID => {
35936                Some(Self::DEBUG_FLOAT_ARRAY(DEBUG_FLOAT_ARRAY_DATA::default()))
35937            }
35938            DEBUG_VECT_DATA::ID => Some(Self::DEBUG_VECT(DEBUG_VECT_DATA::default())),
35939            DISTANCE_SENSOR_DATA::ID => {
35940                Some(Self::DISTANCE_SENSOR(DISTANCE_SENSOR_DATA::default()))
35941            }
35942            EFI_STATUS_DATA::ID => Some(Self::EFI_STATUS(EFI_STATUS_DATA::default())),
35943            EKF_EXT_DATA::ID => Some(Self::EKF_EXT(EKF_EXT_DATA::default())),
35944            ENCAPSULATED_DATA_DATA::ID => {
35945                Some(Self::ENCAPSULATED_DATA(ENCAPSULATED_DATA_DATA::default()))
35946            }
35947            ESC_INFO_DATA::ID => Some(Self::ESC_INFO(ESC_INFO_DATA::default())),
35948            ESC_STATUS_DATA::ID => Some(Self::ESC_STATUS(ESC_STATUS_DATA::default())),
35949            ESTIMATOR_STATUS_DATA::ID => {
35950                Some(Self::ESTIMATOR_STATUS(ESTIMATOR_STATUS_DATA::default()))
35951            }
35952            EVENT_DATA::ID => Some(Self::EVENT(EVENT_DATA::default())),
35953            EXTENDED_SYS_STATE_DATA::ID => {
35954                Some(Self::EXTENDED_SYS_STATE(EXTENDED_SYS_STATE_DATA::default()))
35955            }
35956            FENCE_STATUS_DATA::ID => Some(Self::FENCE_STATUS(FENCE_STATUS_DATA::default())),
35957            FILE_TRANSFER_PROTOCOL_DATA::ID => Some(Self::FILE_TRANSFER_PROTOCOL(
35958                FILE_TRANSFER_PROTOCOL_DATA::default(),
35959            )),
35960            FLIGHT_INFORMATION_DATA::ID => {
35961                Some(Self::FLIGHT_INFORMATION(FLIGHT_INFORMATION_DATA::default()))
35962            }
35963            FOLLOW_TARGET_DATA::ID => Some(Self::FOLLOW_TARGET(FOLLOW_TARGET_DATA::default())),
35964            FUEL_STATUS_DATA::ID => Some(Self::FUEL_STATUS(FUEL_STATUS_DATA::default())),
35965            FW_SOARING_DATA_DATA::ID => {
35966                Some(Self::FW_SOARING_DATA(FW_SOARING_DATA_DATA::default()))
35967            }
35968            GENERATOR_STATUS_DATA::ID => {
35969                Some(Self::GENERATOR_STATUS(GENERATOR_STATUS_DATA::default()))
35970            }
35971            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID => Some(Self::GIMBAL_DEVICE_ATTITUDE_STATUS(
35972                GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::default(),
35973            )),
35974            GIMBAL_DEVICE_INFORMATION_DATA::ID => Some(Self::GIMBAL_DEVICE_INFORMATION(
35975                GIMBAL_DEVICE_INFORMATION_DATA::default(),
35976            )),
35977            GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID => Some(Self::GIMBAL_DEVICE_SET_ATTITUDE(
35978                GIMBAL_DEVICE_SET_ATTITUDE_DATA::default(),
35979            )),
35980            GIMBAL_MANAGER_INFORMATION_DATA::ID => Some(Self::GIMBAL_MANAGER_INFORMATION(
35981                GIMBAL_MANAGER_INFORMATION_DATA::default(),
35982            )),
35983            GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID => Some(Self::GIMBAL_MANAGER_SET_ATTITUDE(
35984                GIMBAL_MANAGER_SET_ATTITUDE_DATA::default(),
35985            )),
35986            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID => {
35987                Some(Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(
35988                    GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::default(),
35989                ))
35990            }
35991            GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID => Some(Self::GIMBAL_MANAGER_SET_PITCHYAW(
35992                GIMBAL_MANAGER_SET_PITCHYAW_DATA::default(),
35993            )),
35994            GIMBAL_MANAGER_STATUS_DATA::ID => Some(Self::GIMBAL_MANAGER_STATUS(
35995                GIMBAL_MANAGER_STATUS_DATA::default(),
35996            )),
35997            GLOBAL_POSITION_INT_DATA::ID => Some(Self::GLOBAL_POSITION_INT(
35998                GLOBAL_POSITION_INT_DATA::default(),
35999            )),
36000            GLOBAL_POSITION_INT_COV_DATA::ID => Some(Self::GLOBAL_POSITION_INT_COV(
36001                GLOBAL_POSITION_INT_COV_DATA::default(),
36002            )),
36003            GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID => {
36004                Some(Self::GLOBAL_VISION_POSITION_ESTIMATE(
36005                    GLOBAL_VISION_POSITION_ESTIMATE_DATA::default(),
36006                ))
36007            }
36008            GPS2_RAW_DATA::ID => Some(Self::GPS2_RAW(GPS2_RAW_DATA::default())),
36009            GPS2_RTK_DATA::ID => Some(Self::GPS2_RTK(GPS2_RTK_DATA::default())),
36010            GPS_GLOBAL_ORIGIN_DATA::ID => {
36011                Some(Self::GPS_GLOBAL_ORIGIN(GPS_GLOBAL_ORIGIN_DATA::default()))
36012            }
36013            GPS_INJECT_DATA_DATA::ID => {
36014                Some(Self::GPS_INJECT_DATA(GPS_INJECT_DATA_DATA::default()))
36015            }
36016            GPS_INPUT_DATA::ID => Some(Self::GPS_INPUT(GPS_INPUT_DATA::default())),
36017            GPS_RAW_INT_DATA::ID => Some(Self::GPS_RAW_INT(GPS_RAW_INT_DATA::default())),
36018            GPS_RTCM_DATA_DATA::ID => Some(Self::GPS_RTCM_DATA(GPS_RTCM_DATA_DATA::default())),
36019            GPS_RTK_DATA::ID => Some(Self::GPS_RTK(GPS_RTK_DATA::default())),
36020            GPS_STATUS_DATA::ID => Some(Self::GPS_STATUS(GPS_STATUS_DATA::default())),
36021            GSM_LINK_STATUS_DATA::ID => {
36022                Some(Self::GSM_LINK_STATUS(GSM_LINK_STATUS_DATA::default()))
36023            }
36024            HEARTBEAT_DATA::ID => Some(Self::HEARTBEAT(HEARTBEAT_DATA::default())),
36025            HIGHRES_IMU_DATA::ID => Some(Self::HIGHRES_IMU(HIGHRES_IMU_DATA::default())),
36026            HIGH_LATENCY_DATA::ID => Some(Self::HIGH_LATENCY(HIGH_LATENCY_DATA::default())),
36027            HIGH_LATENCY2_DATA::ID => Some(Self::HIGH_LATENCY2(HIGH_LATENCY2_DATA::default())),
36028            HIL_ACTUATOR_CONTROLS_DATA::ID => Some(Self::HIL_ACTUATOR_CONTROLS(
36029                HIL_ACTUATOR_CONTROLS_DATA::default(),
36030            )),
36031            HIL_CONTROLS_DATA::ID => Some(Self::HIL_CONTROLS(HIL_CONTROLS_DATA::default())),
36032            HIL_GPS_DATA::ID => Some(Self::HIL_GPS(HIL_GPS_DATA::default())),
36033            HIL_OPTICAL_FLOW_DATA::ID => {
36034                Some(Self::HIL_OPTICAL_FLOW(HIL_OPTICAL_FLOW_DATA::default()))
36035            }
36036            HIL_RC_INPUTS_RAW_DATA::ID => {
36037                Some(Self::HIL_RC_INPUTS_RAW(HIL_RC_INPUTS_RAW_DATA::default()))
36038            }
36039            HIL_SENSOR_DATA::ID => Some(Self::HIL_SENSOR(HIL_SENSOR_DATA::default())),
36040            HIL_STATE_DATA::ID => Some(Self::HIL_STATE(HIL_STATE_DATA::default())),
36041            HIL_STATE_QUATERNION_DATA::ID => Some(Self::HIL_STATE_QUATERNION(
36042                HIL_STATE_QUATERNION_DATA::default(),
36043            )),
36044            HOME_POSITION_DATA::ID => Some(Self::HOME_POSITION(HOME_POSITION_DATA::default())),
36045            HYGROMETER_SENSOR_DATA::ID => {
36046                Some(Self::HYGROMETER_SENSOR(HYGROMETER_SENSOR_DATA::default()))
36047            }
36048            ILLUMINATOR_STATUS_DATA::ID => {
36049                Some(Self::ILLUMINATOR_STATUS(ILLUMINATOR_STATUS_DATA::default()))
36050            }
36051            ISBD_LINK_STATUS_DATA::ID => {
36052                Some(Self::ISBD_LINK_STATUS(ISBD_LINK_STATUS_DATA::default()))
36053            }
36054            LANDING_TARGET_DATA::ID => Some(Self::LANDING_TARGET(LANDING_TARGET_DATA::default())),
36055            LINK_NODE_STATUS_DATA::ID => {
36056                Some(Self::LINK_NODE_STATUS(LINK_NODE_STATUS_DATA::default()))
36057            }
36058            LOCAL_POSITION_NED_DATA::ID => {
36059                Some(Self::LOCAL_POSITION_NED(LOCAL_POSITION_NED_DATA::default()))
36060            }
36061            LOCAL_POSITION_NED_COV_DATA::ID => Some(Self::LOCAL_POSITION_NED_COV(
36062                LOCAL_POSITION_NED_COV_DATA::default(),
36063            )),
36064            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID => {
36065                Some(Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(
36066                    LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::default(),
36067                ))
36068            }
36069            LOGGING_ACK_DATA::ID => Some(Self::LOGGING_ACK(LOGGING_ACK_DATA::default())),
36070            LOGGING_DATA_DATA::ID => Some(Self::LOGGING_DATA(LOGGING_DATA_DATA::default())),
36071            LOGGING_DATA_ACKED_DATA::ID => {
36072                Some(Self::LOGGING_DATA_ACKED(LOGGING_DATA_ACKED_DATA::default()))
36073            }
36074            LOG_DATA_DATA::ID => Some(Self::LOG_DATA(LOG_DATA_DATA::default())),
36075            LOG_ENTRY_DATA::ID => Some(Self::LOG_ENTRY(LOG_ENTRY_DATA::default())),
36076            LOG_ERASE_DATA::ID => Some(Self::LOG_ERASE(LOG_ERASE_DATA::default())),
36077            LOG_REQUEST_DATA_DATA::ID => {
36078                Some(Self::LOG_REQUEST_DATA(LOG_REQUEST_DATA_DATA::default()))
36079            }
36080            LOG_REQUEST_END_DATA::ID => {
36081                Some(Self::LOG_REQUEST_END(LOG_REQUEST_END_DATA::default()))
36082            }
36083            LOG_REQUEST_LIST_DATA::ID => {
36084                Some(Self::LOG_REQUEST_LIST(LOG_REQUEST_LIST_DATA::default()))
36085            }
36086            MAG_CAL_REPORT_DATA::ID => Some(Self::MAG_CAL_REPORT(MAG_CAL_REPORT_DATA::default())),
36087            MANUAL_CONTROL_DATA::ID => Some(Self::MANUAL_CONTROL(MANUAL_CONTROL_DATA::default())),
36088            MANUAL_SETPOINT_DATA::ID => {
36089                Some(Self::MANUAL_SETPOINT(MANUAL_SETPOINT_DATA::default()))
36090            }
36091            MEMORY_VECT_DATA::ID => Some(Self::MEMORY_VECT(MEMORY_VECT_DATA::default())),
36092            MESSAGE_INTERVAL_DATA::ID => {
36093                Some(Self::MESSAGE_INTERVAL(MESSAGE_INTERVAL_DATA::default()))
36094            }
36095            MISSION_ACK_DATA::ID => Some(Self::MISSION_ACK(MISSION_ACK_DATA::default())),
36096            MISSION_CLEAR_ALL_DATA::ID => {
36097                Some(Self::MISSION_CLEAR_ALL(MISSION_CLEAR_ALL_DATA::default()))
36098            }
36099            MISSION_COUNT_DATA::ID => Some(Self::MISSION_COUNT(MISSION_COUNT_DATA::default())),
36100            MISSION_CURRENT_DATA::ID => {
36101                Some(Self::MISSION_CURRENT(MISSION_CURRENT_DATA::default()))
36102            }
36103            MISSION_ITEM_DATA::ID => Some(Self::MISSION_ITEM(MISSION_ITEM_DATA::default())),
36104            MISSION_ITEM_INT_DATA::ID => {
36105                Some(Self::MISSION_ITEM_INT(MISSION_ITEM_INT_DATA::default()))
36106            }
36107            MISSION_ITEM_REACHED_DATA::ID => Some(Self::MISSION_ITEM_REACHED(
36108                MISSION_ITEM_REACHED_DATA::default(),
36109            )),
36110            MISSION_REQUEST_DATA::ID => {
36111                Some(Self::MISSION_REQUEST(MISSION_REQUEST_DATA::default()))
36112            }
36113            MISSION_REQUEST_INT_DATA::ID => Some(Self::MISSION_REQUEST_INT(
36114                MISSION_REQUEST_INT_DATA::default(),
36115            )),
36116            MISSION_REQUEST_LIST_DATA::ID => Some(Self::MISSION_REQUEST_LIST(
36117                MISSION_REQUEST_LIST_DATA::default(),
36118            )),
36119            MISSION_REQUEST_PARTIAL_LIST_DATA::ID => Some(Self::MISSION_REQUEST_PARTIAL_LIST(
36120                MISSION_REQUEST_PARTIAL_LIST_DATA::default(),
36121            )),
36122            MISSION_SET_CURRENT_DATA::ID => Some(Self::MISSION_SET_CURRENT(
36123                MISSION_SET_CURRENT_DATA::default(),
36124            )),
36125            MISSION_WRITE_PARTIAL_LIST_DATA::ID => Some(Self::MISSION_WRITE_PARTIAL_LIST(
36126                MISSION_WRITE_PARTIAL_LIST_DATA::default(),
36127            )),
36128            MOUNT_ORIENTATION_DATA::ID => {
36129                Some(Self::MOUNT_ORIENTATION(MOUNT_ORIENTATION_DATA::default()))
36130            }
36131            NAMED_VALUE_FLOAT_DATA::ID => {
36132                Some(Self::NAMED_VALUE_FLOAT(NAMED_VALUE_FLOAT_DATA::default()))
36133            }
36134            NAMED_VALUE_INT_DATA::ID => {
36135                Some(Self::NAMED_VALUE_INT(NAMED_VALUE_INT_DATA::default()))
36136            }
36137            NAV_CONTROLLER_OUTPUT_DATA::ID => Some(Self::NAV_CONTROLLER_OUTPUT(
36138                NAV_CONTROLLER_OUTPUT_DATA::default(),
36139            )),
36140            OBSTACLE_DISTANCE_DATA::ID => {
36141                Some(Self::OBSTACLE_DISTANCE(OBSTACLE_DISTANCE_DATA::default()))
36142            }
36143            ODOMETRY_DATA::ID => Some(Self::ODOMETRY(ODOMETRY_DATA::default())),
36144            ONBOARD_COMPUTER_STATUS_DATA::ID => Some(Self::ONBOARD_COMPUTER_STATUS(
36145                ONBOARD_COMPUTER_STATUS_DATA::default(),
36146            )),
36147            OPEN_DRONE_ID_ARM_STATUS_DATA::ID => Some(Self::OPEN_DRONE_ID_ARM_STATUS(
36148                OPEN_DRONE_ID_ARM_STATUS_DATA::default(),
36149            )),
36150            OPEN_DRONE_ID_AUTHENTICATION_DATA::ID => Some(Self::OPEN_DRONE_ID_AUTHENTICATION(
36151                OPEN_DRONE_ID_AUTHENTICATION_DATA::default(),
36152            )),
36153            OPEN_DRONE_ID_BASIC_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_BASIC_ID(
36154                OPEN_DRONE_ID_BASIC_ID_DATA::default(),
36155            )),
36156            OPEN_DRONE_ID_LOCATION_DATA::ID => Some(Self::OPEN_DRONE_ID_LOCATION(
36157                OPEN_DRONE_ID_LOCATION_DATA::default(),
36158            )),
36159            OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID => Some(Self::OPEN_DRONE_ID_MESSAGE_PACK(
36160                OPEN_DRONE_ID_MESSAGE_PACK_DATA::default(),
36161            )),
36162            OPEN_DRONE_ID_OPERATOR_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_OPERATOR_ID(
36163                OPEN_DRONE_ID_OPERATOR_ID_DATA::default(),
36164            )),
36165            OPEN_DRONE_ID_SELF_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_SELF_ID(
36166                OPEN_DRONE_ID_SELF_ID_DATA::default(),
36167            )),
36168            OPEN_DRONE_ID_SYSTEM_DATA::ID => Some(Self::OPEN_DRONE_ID_SYSTEM(
36169                OPEN_DRONE_ID_SYSTEM_DATA::default(),
36170            )),
36171            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID => Some(Self::OPEN_DRONE_ID_SYSTEM_UPDATE(
36172                OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::default(),
36173            )),
36174            OPTICAL_FLOW_DATA::ID => Some(Self::OPTICAL_FLOW(OPTICAL_FLOW_DATA::default())),
36175            OPTICAL_FLOW_RAD_DATA::ID => {
36176                Some(Self::OPTICAL_FLOW_RAD(OPTICAL_FLOW_RAD_DATA::default()))
36177            }
36178            ORBIT_EXECUTION_STATUS_DATA::ID => Some(Self::ORBIT_EXECUTION_STATUS(
36179                ORBIT_EXECUTION_STATUS_DATA::default(),
36180            )),
36181            PARAM_EXT_ACK_DATA::ID => Some(Self::PARAM_EXT_ACK(PARAM_EXT_ACK_DATA::default())),
36182            PARAM_EXT_REQUEST_LIST_DATA::ID => Some(Self::PARAM_EXT_REQUEST_LIST(
36183                PARAM_EXT_REQUEST_LIST_DATA::default(),
36184            )),
36185            PARAM_EXT_REQUEST_READ_DATA::ID => Some(Self::PARAM_EXT_REQUEST_READ(
36186                PARAM_EXT_REQUEST_READ_DATA::default(),
36187            )),
36188            PARAM_EXT_SET_DATA::ID => Some(Self::PARAM_EXT_SET(PARAM_EXT_SET_DATA::default())),
36189            PARAM_EXT_VALUE_DATA::ID => {
36190                Some(Self::PARAM_EXT_VALUE(PARAM_EXT_VALUE_DATA::default()))
36191            }
36192            PARAM_MAP_RC_DATA::ID => Some(Self::PARAM_MAP_RC(PARAM_MAP_RC_DATA::default())),
36193            PARAM_REQUEST_LIST_DATA::ID => {
36194                Some(Self::PARAM_REQUEST_LIST(PARAM_REQUEST_LIST_DATA::default()))
36195            }
36196            PARAM_REQUEST_READ_DATA::ID => {
36197                Some(Self::PARAM_REQUEST_READ(PARAM_REQUEST_READ_DATA::default()))
36198            }
36199            PARAM_SET_DATA::ID => Some(Self::PARAM_SET(PARAM_SET_DATA::default())),
36200            PARAM_VALUE_DATA::ID => Some(Self::PARAM_VALUE(PARAM_VALUE_DATA::default())),
36201            PING_DATA::ID => Some(Self::PING(PING_DATA::default())),
36202            PLAY_TUNE_DATA::ID => Some(Self::PLAY_TUNE(PLAY_TUNE_DATA::default())),
36203            PLAY_TUNE_V2_DATA::ID => Some(Self::PLAY_TUNE_V2(PLAY_TUNE_V2_DATA::default())),
36204            POSITION_TARGET_GLOBAL_INT_DATA::ID => Some(Self::POSITION_TARGET_GLOBAL_INT(
36205                POSITION_TARGET_GLOBAL_INT_DATA::default(),
36206            )),
36207            POSITION_TARGET_LOCAL_NED_DATA::ID => Some(Self::POSITION_TARGET_LOCAL_NED(
36208                POSITION_TARGET_LOCAL_NED_DATA::default(),
36209            )),
36210            POWER_STATUS_DATA::ID => Some(Self::POWER_STATUS(POWER_STATUS_DATA::default())),
36211            PROTOCOL_VERSION_DATA::ID => {
36212                Some(Self::PROTOCOL_VERSION(PROTOCOL_VERSION_DATA::default()))
36213            }
36214            RADIO_STATUS_DATA::ID => Some(Self::RADIO_STATUS(RADIO_STATUS_DATA::default())),
36215            RAW_IMU_DATA::ID => Some(Self::RAW_IMU(RAW_IMU_DATA::default())),
36216            RAW_PRESSURE_DATA::ID => Some(Self::RAW_PRESSURE(RAW_PRESSURE_DATA::default())),
36217            RAW_RPM_DATA::ID => Some(Self::RAW_RPM(RAW_RPM_DATA::default())),
36218            RC_CHANNELS_DATA::ID => Some(Self::RC_CHANNELS(RC_CHANNELS_DATA::default())),
36219            RC_CHANNELS_OVERRIDE_DATA::ID => Some(Self::RC_CHANNELS_OVERRIDE(
36220                RC_CHANNELS_OVERRIDE_DATA::default(),
36221            )),
36222            RC_CHANNELS_RAW_DATA::ID => {
36223                Some(Self::RC_CHANNELS_RAW(RC_CHANNELS_RAW_DATA::default()))
36224            }
36225            RC_CHANNELS_SCALED_DATA::ID => {
36226                Some(Self::RC_CHANNELS_SCALED(RC_CHANNELS_SCALED_DATA::default()))
36227            }
36228            REQUEST_DATA_STREAM_DATA::ID => Some(Self::REQUEST_DATA_STREAM(
36229                REQUEST_DATA_STREAM_DATA::default(),
36230            )),
36231            REQUEST_EVENT_DATA::ID => Some(Self::REQUEST_EVENT(REQUEST_EVENT_DATA::default())),
36232            RESOURCE_REQUEST_DATA::ID => {
36233                Some(Self::RESOURCE_REQUEST(RESOURCE_REQUEST_DATA::default()))
36234            }
36235            RESPONSE_EVENT_ERROR_DATA::ID => Some(Self::RESPONSE_EVENT_ERROR(
36236                RESPONSE_EVENT_ERROR_DATA::default(),
36237            )),
36238            SAFETY_ALLOWED_AREA_DATA::ID => Some(Self::SAFETY_ALLOWED_AREA(
36239                SAFETY_ALLOWED_AREA_DATA::default(),
36240            )),
36241            SAFETY_SET_ALLOWED_AREA_DATA::ID => Some(Self::SAFETY_SET_ALLOWED_AREA(
36242                SAFETY_SET_ALLOWED_AREA_DATA::default(),
36243            )),
36244            SATCOM_LINK_STATUS_DATA::ID => {
36245                Some(Self::SATCOM_LINK_STATUS(SATCOM_LINK_STATUS_DATA::default()))
36246            }
36247            SCALED_IMU_DATA::ID => Some(Self::SCALED_IMU(SCALED_IMU_DATA::default())),
36248            SCALED_IMU2_DATA::ID => Some(Self::SCALED_IMU2(SCALED_IMU2_DATA::default())),
36249            SCALED_IMU3_DATA::ID => Some(Self::SCALED_IMU3(SCALED_IMU3_DATA::default())),
36250            SCALED_PRESSURE_DATA::ID => {
36251                Some(Self::SCALED_PRESSURE(SCALED_PRESSURE_DATA::default()))
36252            }
36253            SCALED_PRESSURE2_DATA::ID => {
36254                Some(Self::SCALED_PRESSURE2(SCALED_PRESSURE2_DATA::default()))
36255            }
36256            SCALED_PRESSURE3_DATA::ID => {
36257                Some(Self::SCALED_PRESSURE3(SCALED_PRESSURE3_DATA::default()))
36258            }
36259            SENSORPOD_STATUS_DATA::ID => {
36260                Some(Self::SENSORPOD_STATUS(SENSORPOD_STATUS_DATA::default()))
36261            }
36262            SENSOR_AIRFLOW_ANGLES_DATA::ID => Some(Self::SENSOR_AIRFLOW_ANGLES(
36263                SENSOR_AIRFLOW_ANGLES_DATA::default(),
36264            )),
36265            SENS_ATMOS_DATA::ID => Some(Self::SENS_ATMOS(SENS_ATMOS_DATA::default())),
36266            SENS_BATMON_DATA::ID => Some(Self::SENS_BATMON(SENS_BATMON_DATA::default())),
36267            SENS_MPPT_DATA::ID => Some(Self::SENS_MPPT(SENS_MPPT_DATA::default())),
36268            SENS_POWER_DATA::ID => Some(Self::SENS_POWER(SENS_POWER_DATA::default())),
36269            SENS_POWER_BOARD_DATA::ID => {
36270                Some(Self::SENS_POWER_BOARD(SENS_POWER_BOARD_DATA::default()))
36271            }
36272            SERIAL_CONTROL_DATA::ID => Some(Self::SERIAL_CONTROL(SERIAL_CONTROL_DATA::default())),
36273            SERVO_OUTPUT_RAW_DATA::ID => {
36274                Some(Self::SERVO_OUTPUT_RAW(SERVO_OUTPUT_RAW_DATA::default()))
36275            }
36276            SETUP_SIGNING_DATA::ID => Some(Self::SETUP_SIGNING(SETUP_SIGNING_DATA::default())),
36277            SET_ACTUATOR_CONTROL_TARGET_DATA::ID => Some(Self::SET_ACTUATOR_CONTROL_TARGET(
36278                SET_ACTUATOR_CONTROL_TARGET_DATA::default(),
36279            )),
36280            SET_ATTITUDE_TARGET_DATA::ID => Some(Self::SET_ATTITUDE_TARGET(
36281                SET_ATTITUDE_TARGET_DATA::default(),
36282            )),
36283            SET_GPS_GLOBAL_ORIGIN_DATA::ID => Some(Self::SET_GPS_GLOBAL_ORIGIN(
36284                SET_GPS_GLOBAL_ORIGIN_DATA::default(),
36285            )),
36286            SET_HOME_POSITION_DATA::ID => {
36287                Some(Self::SET_HOME_POSITION(SET_HOME_POSITION_DATA::default()))
36288            }
36289            SET_MODE_DATA::ID => Some(Self::SET_MODE(SET_MODE_DATA::default())),
36290            SET_POSITION_TARGET_GLOBAL_INT_DATA::ID => Some(Self::SET_POSITION_TARGET_GLOBAL_INT(
36291                SET_POSITION_TARGET_GLOBAL_INT_DATA::default(),
36292            )),
36293            SET_POSITION_TARGET_LOCAL_NED_DATA::ID => Some(Self::SET_POSITION_TARGET_LOCAL_NED(
36294                SET_POSITION_TARGET_LOCAL_NED_DATA::default(),
36295            )),
36296            SIM_STATE_DATA::ID => Some(Self::SIM_STATE(SIM_STATE_DATA::default())),
36297            SMART_BATTERY_INFO_DATA::ID => {
36298                Some(Self::SMART_BATTERY_INFO(SMART_BATTERY_INFO_DATA::default()))
36299            }
36300            STATUSTEXT_DATA::ID => Some(Self::STATUSTEXT(STATUSTEXT_DATA::default())),
36301            STORAGE_INFORMATION_DATA::ID => Some(Self::STORAGE_INFORMATION(
36302                STORAGE_INFORMATION_DATA::default(),
36303            )),
36304            SUPPORTED_TUNES_DATA::ID => {
36305                Some(Self::SUPPORTED_TUNES(SUPPORTED_TUNES_DATA::default()))
36306            }
36307            SYSTEM_TIME_DATA::ID => Some(Self::SYSTEM_TIME(SYSTEM_TIME_DATA::default())),
36308            SYS_STATUS_DATA::ID => Some(Self::SYS_STATUS(SYS_STATUS_DATA::default())),
36309            TERRAIN_CHECK_DATA::ID => Some(Self::TERRAIN_CHECK(TERRAIN_CHECK_DATA::default())),
36310            TERRAIN_DATA_DATA::ID => Some(Self::TERRAIN_DATA(TERRAIN_DATA_DATA::default())),
36311            TERRAIN_REPORT_DATA::ID => Some(Self::TERRAIN_REPORT(TERRAIN_REPORT_DATA::default())),
36312            TERRAIN_REQUEST_DATA::ID => {
36313                Some(Self::TERRAIN_REQUEST(TERRAIN_REQUEST_DATA::default()))
36314            }
36315            TIMESYNC_DATA::ID => Some(Self::TIMESYNC(TIMESYNC_DATA::default())),
36316            TIME_ESTIMATE_TO_TARGET_DATA::ID => Some(Self::TIME_ESTIMATE_TO_TARGET(
36317                TIME_ESTIMATE_TO_TARGET_DATA::default(),
36318            )),
36319            TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID => {
36320                Some(Self::TRAJECTORY_REPRESENTATION_BEZIER(
36321                    TRAJECTORY_REPRESENTATION_BEZIER_DATA::default(),
36322                ))
36323            }
36324            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID => {
36325                Some(Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(
36326                    TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::default(),
36327                ))
36328            }
36329            TUNNEL_DATA::ID => Some(Self::TUNNEL(TUNNEL_DATA::default())),
36330            UAVCAN_NODE_INFO_DATA::ID => {
36331                Some(Self::UAVCAN_NODE_INFO(UAVCAN_NODE_INFO_DATA::default()))
36332            }
36333            UAVCAN_NODE_STATUS_DATA::ID => {
36334                Some(Self::UAVCAN_NODE_STATUS(UAVCAN_NODE_STATUS_DATA::default()))
36335            }
36336            UTM_GLOBAL_POSITION_DATA::ID => Some(Self::UTM_GLOBAL_POSITION(
36337                UTM_GLOBAL_POSITION_DATA::default(),
36338            )),
36339            V2_EXTENSION_DATA::ID => Some(Self::V2_EXTENSION(V2_EXTENSION_DATA::default())),
36340            VFR_HUD_DATA::ID => Some(Self::VFR_HUD(VFR_HUD_DATA::default())),
36341            VIBRATION_DATA::ID => Some(Self::VIBRATION(VIBRATION_DATA::default())),
36342            VICON_POSITION_ESTIMATE_DATA::ID => Some(Self::VICON_POSITION_ESTIMATE(
36343                VICON_POSITION_ESTIMATE_DATA::default(),
36344            )),
36345            VIDEO_STREAM_INFORMATION_DATA::ID => Some(Self::VIDEO_STREAM_INFORMATION(
36346                VIDEO_STREAM_INFORMATION_DATA::default(),
36347            )),
36348            VIDEO_STREAM_STATUS_DATA::ID => Some(Self::VIDEO_STREAM_STATUS(
36349                VIDEO_STREAM_STATUS_DATA::default(),
36350            )),
36351            VISION_POSITION_ESTIMATE_DATA::ID => Some(Self::VISION_POSITION_ESTIMATE(
36352                VISION_POSITION_ESTIMATE_DATA::default(),
36353            )),
36354            VISION_SPEED_ESTIMATE_DATA::ID => Some(Self::VISION_SPEED_ESTIMATE(
36355                VISION_SPEED_ESTIMATE_DATA::default(),
36356            )),
36357            WHEEL_DISTANCE_DATA::ID => Some(Self::WHEEL_DISTANCE(WHEEL_DISTANCE_DATA::default())),
36358            WIFI_CONFIG_AP_DATA::ID => Some(Self::WIFI_CONFIG_AP(WIFI_CONFIG_AP_DATA::default())),
36359            WINCH_STATUS_DATA::ID => Some(Self::WINCH_STATUS(WINCH_STATUS_DATA::default())),
36360            WIND_COV_DATA::ID => Some(Self::WIND_COV(WIND_COV_DATA::default())),
36361            _ => None,
36362        }
36363    }
36364    #[cfg(feature = "arbitrary")]
36365    fn random_message_from_id<R: rand::RngCore>(id: u32, rng: &mut R) -> Option<Self> {
36366        match id {
36367            ACTUATOR_CONTROL_TARGET_DATA::ID => Some(Self::ACTUATOR_CONTROL_TARGET(
36368                ACTUATOR_CONTROL_TARGET_DATA::random(rng),
36369            )),
36370            ACTUATOR_OUTPUT_STATUS_DATA::ID => Some(Self::ACTUATOR_OUTPUT_STATUS(
36371                ACTUATOR_OUTPUT_STATUS_DATA::random(rng),
36372            )),
36373            ADSB_VEHICLE_DATA::ID => Some(Self::ADSB_VEHICLE(ADSB_VEHICLE_DATA::random(rng))),
36374            AIS_VESSEL_DATA::ID => Some(Self::AIS_VESSEL(AIS_VESSEL_DATA::random(rng))),
36375            ALTITUDE_DATA::ID => Some(Self::ALTITUDE(ALTITUDE_DATA::random(rng))),
36376            ASLCTRL_DATA_DATA::ID => Some(Self::ASLCTRL_DATA(ASLCTRL_DATA_DATA::random(rng))),
36377            ASLCTRL_DEBUG_DATA::ID => Some(Self::ASLCTRL_DEBUG(ASLCTRL_DEBUG_DATA::random(rng))),
36378            ASLUAV_STATUS_DATA::ID => Some(Self::ASLUAV_STATUS(ASLUAV_STATUS_DATA::random(rng))),
36379            ASL_OBCTRL_DATA::ID => Some(Self::ASL_OBCTRL(ASL_OBCTRL_DATA::random(rng))),
36380            ATTITUDE_DATA::ID => Some(Self::ATTITUDE(ATTITUDE_DATA::random(rng))),
36381            ATTITUDE_QUATERNION_DATA::ID => Some(Self::ATTITUDE_QUATERNION(
36382                ATTITUDE_QUATERNION_DATA::random(rng),
36383            )),
36384            ATTITUDE_QUATERNION_COV_DATA::ID => Some(Self::ATTITUDE_QUATERNION_COV(
36385                ATTITUDE_QUATERNION_COV_DATA::random(rng),
36386            )),
36387            ATTITUDE_TARGET_DATA::ID => {
36388                Some(Self::ATTITUDE_TARGET(ATTITUDE_TARGET_DATA::random(rng)))
36389            }
36390            ATT_POS_MOCAP_DATA::ID => Some(Self::ATT_POS_MOCAP(ATT_POS_MOCAP_DATA::random(rng))),
36391            AUTH_KEY_DATA::ID => Some(Self::AUTH_KEY(AUTH_KEY_DATA::random(rng))),
36392            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID => {
36393                Some(Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(
36394                    AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::random(rng),
36395                ))
36396            }
36397            AUTOPILOT_VERSION_DATA::ID => {
36398                Some(Self::AUTOPILOT_VERSION(AUTOPILOT_VERSION_DATA::random(rng)))
36399            }
36400            AVAILABLE_MODES_DATA::ID => {
36401                Some(Self::AVAILABLE_MODES(AVAILABLE_MODES_DATA::random(rng)))
36402            }
36403            AVAILABLE_MODES_MONITOR_DATA::ID => Some(Self::AVAILABLE_MODES_MONITOR(
36404                AVAILABLE_MODES_MONITOR_DATA::random(rng),
36405            )),
36406            BATTERY_INFO_DATA::ID => Some(Self::BATTERY_INFO(BATTERY_INFO_DATA::random(rng))),
36407            BATTERY_STATUS_DATA::ID => Some(Self::BATTERY_STATUS(BATTERY_STATUS_DATA::random(rng))),
36408            BUTTON_CHANGE_DATA::ID => Some(Self::BUTTON_CHANGE(BUTTON_CHANGE_DATA::random(rng))),
36409            CAMERA_CAPTURE_STATUS_DATA::ID => Some(Self::CAMERA_CAPTURE_STATUS(
36410                CAMERA_CAPTURE_STATUS_DATA::random(rng),
36411            )),
36412            CAMERA_FOV_STATUS_DATA::ID => {
36413                Some(Self::CAMERA_FOV_STATUS(CAMERA_FOV_STATUS_DATA::random(rng)))
36414            }
36415            CAMERA_IMAGE_CAPTURED_DATA::ID => Some(Self::CAMERA_IMAGE_CAPTURED(
36416                CAMERA_IMAGE_CAPTURED_DATA::random(rng),
36417            )),
36418            CAMERA_INFORMATION_DATA::ID => Some(Self::CAMERA_INFORMATION(
36419                CAMERA_INFORMATION_DATA::random(rng),
36420            )),
36421            CAMERA_SETTINGS_DATA::ID => {
36422                Some(Self::CAMERA_SETTINGS(CAMERA_SETTINGS_DATA::random(rng)))
36423            }
36424            CAMERA_THERMAL_RANGE_DATA::ID => Some(Self::CAMERA_THERMAL_RANGE(
36425                CAMERA_THERMAL_RANGE_DATA::random(rng),
36426            )),
36427            CAMERA_TRACKING_GEO_STATUS_DATA::ID => Some(Self::CAMERA_TRACKING_GEO_STATUS(
36428                CAMERA_TRACKING_GEO_STATUS_DATA::random(rng),
36429            )),
36430            CAMERA_TRACKING_IMAGE_STATUS_DATA::ID => Some(Self::CAMERA_TRACKING_IMAGE_STATUS(
36431                CAMERA_TRACKING_IMAGE_STATUS_DATA::random(rng),
36432            )),
36433            CAMERA_TRIGGER_DATA::ID => Some(Self::CAMERA_TRIGGER(CAMERA_TRIGGER_DATA::random(rng))),
36434            CANFD_FRAME_DATA::ID => Some(Self::CANFD_FRAME(CANFD_FRAME_DATA::random(rng))),
36435            CAN_FILTER_MODIFY_DATA::ID => {
36436                Some(Self::CAN_FILTER_MODIFY(CAN_FILTER_MODIFY_DATA::random(rng)))
36437            }
36438            CAN_FRAME_DATA::ID => Some(Self::CAN_FRAME(CAN_FRAME_DATA::random(rng))),
36439            CELLULAR_CONFIG_DATA::ID => {
36440                Some(Self::CELLULAR_CONFIG(CELLULAR_CONFIG_DATA::random(rng)))
36441            }
36442            CELLULAR_STATUS_DATA::ID => {
36443                Some(Self::CELLULAR_STATUS(CELLULAR_STATUS_DATA::random(rng)))
36444            }
36445            CHANGE_OPERATOR_CONTROL_DATA::ID => Some(Self::CHANGE_OPERATOR_CONTROL(
36446                CHANGE_OPERATOR_CONTROL_DATA::random(rng),
36447            )),
36448            CHANGE_OPERATOR_CONTROL_ACK_DATA::ID => Some(Self::CHANGE_OPERATOR_CONTROL_ACK(
36449                CHANGE_OPERATOR_CONTROL_ACK_DATA::random(rng),
36450            )),
36451            COLLISION_DATA::ID => Some(Self::COLLISION(COLLISION_DATA::random(rng))),
36452            COMMAND_ACK_DATA::ID => Some(Self::COMMAND_ACK(COMMAND_ACK_DATA::random(rng))),
36453            COMMAND_CANCEL_DATA::ID => Some(Self::COMMAND_CANCEL(COMMAND_CANCEL_DATA::random(rng))),
36454            COMMAND_INT_DATA::ID => Some(Self::COMMAND_INT(COMMAND_INT_DATA::random(rng))),
36455            COMMAND_INT_STAMPED_DATA::ID => Some(Self::COMMAND_INT_STAMPED(
36456                COMMAND_INT_STAMPED_DATA::random(rng),
36457            )),
36458            COMMAND_LONG_DATA::ID => Some(Self::COMMAND_LONG(COMMAND_LONG_DATA::random(rng))),
36459            COMMAND_LONG_STAMPED_DATA::ID => Some(Self::COMMAND_LONG_STAMPED(
36460                COMMAND_LONG_STAMPED_DATA::random(rng),
36461            )),
36462            COMPONENT_INFORMATION_DATA::ID => Some(Self::COMPONENT_INFORMATION(
36463                COMPONENT_INFORMATION_DATA::random(rng),
36464            )),
36465            COMPONENT_INFORMATION_BASIC_DATA::ID => Some(Self::COMPONENT_INFORMATION_BASIC(
36466                COMPONENT_INFORMATION_BASIC_DATA::random(rng),
36467            )),
36468            COMPONENT_METADATA_DATA::ID => Some(Self::COMPONENT_METADATA(
36469                COMPONENT_METADATA_DATA::random(rng),
36470            )),
36471            CONTROL_SYSTEM_STATE_DATA::ID => Some(Self::CONTROL_SYSTEM_STATE(
36472                CONTROL_SYSTEM_STATE_DATA::random(rng),
36473            )),
36474            CURRENT_EVENT_SEQUENCE_DATA::ID => Some(Self::CURRENT_EVENT_SEQUENCE(
36475                CURRENT_EVENT_SEQUENCE_DATA::random(rng),
36476            )),
36477            CURRENT_MODE_DATA::ID => Some(Self::CURRENT_MODE(CURRENT_MODE_DATA::random(rng))),
36478            DATA_STREAM_DATA::ID => Some(Self::DATA_STREAM(DATA_STREAM_DATA::random(rng))),
36479            DATA_TRANSMISSION_HANDSHAKE_DATA::ID => Some(Self::DATA_TRANSMISSION_HANDSHAKE(
36480                DATA_TRANSMISSION_HANDSHAKE_DATA::random(rng),
36481            )),
36482            DEBUG_DATA::ID => Some(Self::DEBUG(DEBUG_DATA::random(rng))),
36483            DEBUG_FLOAT_ARRAY_DATA::ID => {
36484                Some(Self::DEBUG_FLOAT_ARRAY(DEBUG_FLOAT_ARRAY_DATA::random(rng)))
36485            }
36486            DEBUG_VECT_DATA::ID => Some(Self::DEBUG_VECT(DEBUG_VECT_DATA::random(rng))),
36487            DISTANCE_SENSOR_DATA::ID => {
36488                Some(Self::DISTANCE_SENSOR(DISTANCE_SENSOR_DATA::random(rng)))
36489            }
36490            EFI_STATUS_DATA::ID => Some(Self::EFI_STATUS(EFI_STATUS_DATA::random(rng))),
36491            EKF_EXT_DATA::ID => Some(Self::EKF_EXT(EKF_EXT_DATA::random(rng))),
36492            ENCAPSULATED_DATA_DATA::ID => {
36493                Some(Self::ENCAPSULATED_DATA(ENCAPSULATED_DATA_DATA::random(rng)))
36494            }
36495            ESC_INFO_DATA::ID => Some(Self::ESC_INFO(ESC_INFO_DATA::random(rng))),
36496            ESC_STATUS_DATA::ID => Some(Self::ESC_STATUS(ESC_STATUS_DATA::random(rng))),
36497            ESTIMATOR_STATUS_DATA::ID => {
36498                Some(Self::ESTIMATOR_STATUS(ESTIMATOR_STATUS_DATA::random(rng)))
36499            }
36500            EVENT_DATA::ID => Some(Self::EVENT(EVENT_DATA::random(rng))),
36501            EXTENDED_SYS_STATE_DATA::ID => Some(Self::EXTENDED_SYS_STATE(
36502                EXTENDED_SYS_STATE_DATA::random(rng),
36503            )),
36504            FENCE_STATUS_DATA::ID => Some(Self::FENCE_STATUS(FENCE_STATUS_DATA::random(rng))),
36505            FILE_TRANSFER_PROTOCOL_DATA::ID => Some(Self::FILE_TRANSFER_PROTOCOL(
36506                FILE_TRANSFER_PROTOCOL_DATA::random(rng),
36507            )),
36508            FLIGHT_INFORMATION_DATA::ID => Some(Self::FLIGHT_INFORMATION(
36509                FLIGHT_INFORMATION_DATA::random(rng),
36510            )),
36511            FOLLOW_TARGET_DATA::ID => Some(Self::FOLLOW_TARGET(FOLLOW_TARGET_DATA::random(rng))),
36512            FUEL_STATUS_DATA::ID => Some(Self::FUEL_STATUS(FUEL_STATUS_DATA::random(rng))),
36513            FW_SOARING_DATA_DATA::ID => {
36514                Some(Self::FW_SOARING_DATA(FW_SOARING_DATA_DATA::random(rng)))
36515            }
36516            GENERATOR_STATUS_DATA::ID => {
36517                Some(Self::GENERATOR_STATUS(GENERATOR_STATUS_DATA::random(rng)))
36518            }
36519            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID => Some(Self::GIMBAL_DEVICE_ATTITUDE_STATUS(
36520                GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::random(rng),
36521            )),
36522            GIMBAL_DEVICE_INFORMATION_DATA::ID => Some(Self::GIMBAL_DEVICE_INFORMATION(
36523                GIMBAL_DEVICE_INFORMATION_DATA::random(rng),
36524            )),
36525            GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID => Some(Self::GIMBAL_DEVICE_SET_ATTITUDE(
36526                GIMBAL_DEVICE_SET_ATTITUDE_DATA::random(rng),
36527            )),
36528            GIMBAL_MANAGER_INFORMATION_DATA::ID => Some(Self::GIMBAL_MANAGER_INFORMATION(
36529                GIMBAL_MANAGER_INFORMATION_DATA::random(rng),
36530            )),
36531            GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID => Some(Self::GIMBAL_MANAGER_SET_ATTITUDE(
36532                GIMBAL_MANAGER_SET_ATTITUDE_DATA::random(rng),
36533            )),
36534            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID => {
36535                Some(Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(
36536                    GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::random(rng),
36537                ))
36538            }
36539            GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID => Some(Self::GIMBAL_MANAGER_SET_PITCHYAW(
36540                GIMBAL_MANAGER_SET_PITCHYAW_DATA::random(rng),
36541            )),
36542            GIMBAL_MANAGER_STATUS_DATA::ID => Some(Self::GIMBAL_MANAGER_STATUS(
36543                GIMBAL_MANAGER_STATUS_DATA::random(rng),
36544            )),
36545            GLOBAL_POSITION_INT_DATA::ID => Some(Self::GLOBAL_POSITION_INT(
36546                GLOBAL_POSITION_INT_DATA::random(rng),
36547            )),
36548            GLOBAL_POSITION_INT_COV_DATA::ID => Some(Self::GLOBAL_POSITION_INT_COV(
36549                GLOBAL_POSITION_INT_COV_DATA::random(rng),
36550            )),
36551            GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID => {
36552                Some(Self::GLOBAL_VISION_POSITION_ESTIMATE(
36553                    GLOBAL_VISION_POSITION_ESTIMATE_DATA::random(rng),
36554                ))
36555            }
36556            GPS2_RAW_DATA::ID => Some(Self::GPS2_RAW(GPS2_RAW_DATA::random(rng))),
36557            GPS2_RTK_DATA::ID => Some(Self::GPS2_RTK(GPS2_RTK_DATA::random(rng))),
36558            GPS_GLOBAL_ORIGIN_DATA::ID => {
36559                Some(Self::GPS_GLOBAL_ORIGIN(GPS_GLOBAL_ORIGIN_DATA::random(rng)))
36560            }
36561            GPS_INJECT_DATA_DATA::ID => {
36562                Some(Self::GPS_INJECT_DATA(GPS_INJECT_DATA_DATA::random(rng)))
36563            }
36564            GPS_INPUT_DATA::ID => Some(Self::GPS_INPUT(GPS_INPUT_DATA::random(rng))),
36565            GPS_RAW_INT_DATA::ID => Some(Self::GPS_RAW_INT(GPS_RAW_INT_DATA::random(rng))),
36566            GPS_RTCM_DATA_DATA::ID => Some(Self::GPS_RTCM_DATA(GPS_RTCM_DATA_DATA::random(rng))),
36567            GPS_RTK_DATA::ID => Some(Self::GPS_RTK(GPS_RTK_DATA::random(rng))),
36568            GPS_STATUS_DATA::ID => Some(Self::GPS_STATUS(GPS_STATUS_DATA::random(rng))),
36569            GSM_LINK_STATUS_DATA::ID => {
36570                Some(Self::GSM_LINK_STATUS(GSM_LINK_STATUS_DATA::random(rng)))
36571            }
36572            HEARTBEAT_DATA::ID => Some(Self::HEARTBEAT(HEARTBEAT_DATA::random(rng))),
36573            HIGHRES_IMU_DATA::ID => Some(Self::HIGHRES_IMU(HIGHRES_IMU_DATA::random(rng))),
36574            HIGH_LATENCY_DATA::ID => Some(Self::HIGH_LATENCY(HIGH_LATENCY_DATA::random(rng))),
36575            HIGH_LATENCY2_DATA::ID => Some(Self::HIGH_LATENCY2(HIGH_LATENCY2_DATA::random(rng))),
36576            HIL_ACTUATOR_CONTROLS_DATA::ID => Some(Self::HIL_ACTUATOR_CONTROLS(
36577                HIL_ACTUATOR_CONTROLS_DATA::random(rng),
36578            )),
36579            HIL_CONTROLS_DATA::ID => Some(Self::HIL_CONTROLS(HIL_CONTROLS_DATA::random(rng))),
36580            HIL_GPS_DATA::ID => Some(Self::HIL_GPS(HIL_GPS_DATA::random(rng))),
36581            HIL_OPTICAL_FLOW_DATA::ID => {
36582                Some(Self::HIL_OPTICAL_FLOW(HIL_OPTICAL_FLOW_DATA::random(rng)))
36583            }
36584            HIL_RC_INPUTS_RAW_DATA::ID => {
36585                Some(Self::HIL_RC_INPUTS_RAW(HIL_RC_INPUTS_RAW_DATA::random(rng)))
36586            }
36587            HIL_SENSOR_DATA::ID => Some(Self::HIL_SENSOR(HIL_SENSOR_DATA::random(rng))),
36588            HIL_STATE_DATA::ID => Some(Self::HIL_STATE(HIL_STATE_DATA::random(rng))),
36589            HIL_STATE_QUATERNION_DATA::ID => Some(Self::HIL_STATE_QUATERNION(
36590                HIL_STATE_QUATERNION_DATA::random(rng),
36591            )),
36592            HOME_POSITION_DATA::ID => Some(Self::HOME_POSITION(HOME_POSITION_DATA::random(rng))),
36593            HYGROMETER_SENSOR_DATA::ID => {
36594                Some(Self::HYGROMETER_SENSOR(HYGROMETER_SENSOR_DATA::random(rng)))
36595            }
36596            ILLUMINATOR_STATUS_DATA::ID => Some(Self::ILLUMINATOR_STATUS(
36597                ILLUMINATOR_STATUS_DATA::random(rng),
36598            )),
36599            ISBD_LINK_STATUS_DATA::ID => {
36600                Some(Self::ISBD_LINK_STATUS(ISBD_LINK_STATUS_DATA::random(rng)))
36601            }
36602            LANDING_TARGET_DATA::ID => Some(Self::LANDING_TARGET(LANDING_TARGET_DATA::random(rng))),
36603            LINK_NODE_STATUS_DATA::ID => {
36604                Some(Self::LINK_NODE_STATUS(LINK_NODE_STATUS_DATA::random(rng)))
36605            }
36606            LOCAL_POSITION_NED_DATA::ID => Some(Self::LOCAL_POSITION_NED(
36607                LOCAL_POSITION_NED_DATA::random(rng),
36608            )),
36609            LOCAL_POSITION_NED_COV_DATA::ID => Some(Self::LOCAL_POSITION_NED_COV(
36610                LOCAL_POSITION_NED_COV_DATA::random(rng),
36611            )),
36612            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID => {
36613                Some(Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(
36614                    LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::random(rng),
36615                ))
36616            }
36617            LOGGING_ACK_DATA::ID => Some(Self::LOGGING_ACK(LOGGING_ACK_DATA::random(rng))),
36618            LOGGING_DATA_DATA::ID => Some(Self::LOGGING_DATA(LOGGING_DATA_DATA::random(rng))),
36619            LOGGING_DATA_ACKED_DATA::ID => Some(Self::LOGGING_DATA_ACKED(
36620                LOGGING_DATA_ACKED_DATA::random(rng),
36621            )),
36622            LOG_DATA_DATA::ID => Some(Self::LOG_DATA(LOG_DATA_DATA::random(rng))),
36623            LOG_ENTRY_DATA::ID => Some(Self::LOG_ENTRY(LOG_ENTRY_DATA::random(rng))),
36624            LOG_ERASE_DATA::ID => Some(Self::LOG_ERASE(LOG_ERASE_DATA::random(rng))),
36625            LOG_REQUEST_DATA_DATA::ID => {
36626                Some(Self::LOG_REQUEST_DATA(LOG_REQUEST_DATA_DATA::random(rng)))
36627            }
36628            LOG_REQUEST_END_DATA::ID => {
36629                Some(Self::LOG_REQUEST_END(LOG_REQUEST_END_DATA::random(rng)))
36630            }
36631            LOG_REQUEST_LIST_DATA::ID => {
36632                Some(Self::LOG_REQUEST_LIST(LOG_REQUEST_LIST_DATA::random(rng)))
36633            }
36634            MAG_CAL_REPORT_DATA::ID => Some(Self::MAG_CAL_REPORT(MAG_CAL_REPORT_DATA::random(rng))),
36635            MANUAL_CONTROL_DATA::ID => Some(Self::MANUAL_CONTROL(MANUAL_CONTROL_DATA::random(rng))),
36636            MANUAL_SETPOINT_DATA::ID => {
36637                Some(Self::MANUAL_SETPOINT(MANUAL_SETPOINT_DATA::random(rng)))
36638            }
36639            MEMORY_VECT_DATA::ID => Some(Self::MEMORY_VECT(MEMORY_VECT_DATA::random(rng))),
36640            MESSAGE_INTERVAL_DATA::ID => {
36641                Some(Self::MESSAGE_INTERVAL(MESSAGE_INTERVAL_DATA::random(rng)))
36642            }
36643            MISSION_ACK_DATA::ID => Some(Self::MISSION_ACK(MISSION_ACK_DATA::random(rng))),
36644            MISSION_CLEAR_ALL_DATA::ID => {
36645                Some(Self::MISSION_CLEAR_ALL(MISSION_CLEAR_ALL_DATA::random(rng)))
36646            }
36647            MISSION_COUNT_DATA::ID => Some(Self::MISSION_COUNT(MISSION_COUNT_DATA::random(rng))),
36648            MISSION_CURRENT_DATA::ID => {
36649                Some(Self::MISSION_CURRENT(MISSION_CURRENT_DATA::random(rng)))
36650            }
36651            MISSION_ITEM_DATA::ID => Some(Self::MISSION_ITEM(MISSION_ITEM_DATA::random(rng))),
36652            MISSION_ITEM_INT_DATA::ID => {
36653                Some(Self::MISSION_ITEM_INT(MISSION_ITEM_INT_DATA::random(rng)))
36654            }
36655            MISSION_ITEM_REACHED_DATA::ID => Some(Self::MISSION_ITEM_REACHED(
36656                MISSION_ITEM_REACHED_DATA::random(rng),
36657            )),
36658            MISSION_REQUEST_DATA::ID => {
36659                Some(Self::MISSION_REQUEST(MISSION_REQUEST_DATA::random(rng)))
36660            }
36661            MISSION_REQUEST_INT_DATA::ID => Some(Self::MISSION_REQUEST_INT(
36662                MISSION_REQUEST_INT_DATA::random(rng),
36663            )),
36664            MISSION_REQUEST_LIST_DATA::ID => Some(Self::MISSION_REQUEST_LIST(
36665                MISSION_REQUEST_LIST_DATA::random(rng),
36666            )),
36667            MISSION_REQUEST_PARTIAL_LIST_DATA::ID => Some(Self::MISSION_REQUEST_PARTIAL_LIST(
36668                MISSION_REQUEST_PARTIAL_LIST_DATA::random(rng),
36669            )),
36670            MISSION_SET_CURRENT_DATA::ID => Some(Self::MISSION_SET_CURRENT(
36671                MISSION_SET_CURRENT_DATA::random(rng),
36672            )),
36673            MISSION_WRITE_PARTIAL_LIST_DATA::ID => Some(Self::MISSION_WRITE_PARTIAL_LIST(
36674                MISSION_WRITE_PARTIAL_LIST_DATA::random(rng),
36675            )),
36676            MOUNT_ORIENTATION_DATA::ID => {
36677                Some(Self::MOUNT_ORIENTATION(MOUNT_ORIENTATION_DATA::random(rng)))
36678            }
36679            NAMED_VALUE_FLOAT_DATA::ID => {
36680                Some(Self::NAMED_VALUE_FLOAT(NAMED_VALUE_FLOAT_DATA::random(rng)))
36681            }
36682            NAMED_VALUE_INT_DATA::ID => {
36683                Some(Self::NAMED_VALUE_INT(NAMED_VALUE_INT_DATA::random(rng)))
36684            }
36685            NAV_CONTROLLER_OUTPUT_DATA::ID => Some(Self::NAV_CONTROLLER_OUTPUT(
36686                NAV_CONTROLLER_OUTPUT_DATA::random(rng),
36687            )),
36688            OBSTACLE_DISTANCE_DATA::ID => {
36689                Some(Self::OBSTACLE_DISTANCE(OBSTACLE_DISTANCE_DATA::random(rng)))
36690            }
36691            ODOMETRY_DATA::ID => Some(Self::ODOMETRY(ODOMETRY_DATA::random(rng))),
36692            ONBOARD_COMPUTER_STATUS_DATA::ID => Some(Self::ONBOARD_COMPUTER_STATUS(
36693                ONBOARD_COMPUTER_STATUS_DATA::random(rng),
36694            )),
36695            OPEN_DRONE_ID_ARM_STATUS_DATA::ID => Some(Self::OPEN_DRONE_ID_ARM_STATUS(
36696                OPEN_DRONE_ID_ARM_STATUS_DATA::random(rng),
36697            )),
36698            OPEN_DRONE_ID_AUTHENTICATION_DATA::ID => Some(Self::OPEN_DRONE_ID_AUTHENTICATION(
36699                OPEN_DRONE_ID_AUTHENTICATION_DATA::random(rng),
36700            )),
36701            OPEN_DRONE_ID_BASIC_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_BASIC_ID(
36702                OPEN_DRONE_ID_BASIC_ID_DATA::random(rng),
36703            )),
36704            OPEN_DRONE_ID_LOCATION_DATA::ID => Some(Self::OPEN_DRONE_ID_LOCATION(
36705                OPEN_DRONE_ID_LOCATION_DATA::random(rng),
36706            )),
36707            OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID => Some(Self::OPEN_DRONE_ID_MESSAGE_PACK(
36708                OPEN_DRONE_ID_MESSAGE_PACK_DATA::random(rng),
36709            )),
36710            OPEN_DRONE_ID_OPERATOR_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_OPERATOR_ID(
36711                OPEN_DRONE_ID_OPERATOR_ID_DATA::random(rng),
36712            )),
36713            OPEN_DRONE_ID_SELF_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_SELF_ID(
36714                OPEN_DRONE_ID_SELF_ID_DATA::random(rng),
36715            )),
36716            OPEN_DRONE_ID_SYSTEM_DATA::ID => Some(Self::OPEN_DRONE_ID_SYSTEM(
36717                OPEN_DRONE_ID_SYSTEM_DATA::random(rng),
36718            )),
36719            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID => Some(Self::OPEN_DRONE_ID_SYSTEM_UPDATE(
36720                OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::random(rng),
36721            )),
36722            OPTICAL_FLOW_DATA::ID => Some(Self::OPTICAL_FLOW(OPTICAL_FLOW_DATA::random(rng))),
36723            OPTICAL_FLOW_RAD_DATA::ID => {
36724                Some(Self::OPTICAL_FLOW_RAD(OPTICAL_FLOW_RAD_DATA::random(rng)))
36725            }
36726            ORBIT_EXECUTION_STATUS_DATA::ID => Some(Self::ORBIT_EXECUTION_STATUS(
36727                ORBIT_EXECUTION_STATUS_DATA::random(rng),
36728            )),
36729            PARAM_EXT_ACK_DATA::ID => Some(Self::PARAM_EXT_ACK(PARAM_EXT_ACK_DATA::random(rng))),
36730            PARAM_EXT_REQUEST_LIST_DATA::ID => Some(Self::PARAM_EXT_REQUEST_LIST(
36731                PARAM_EXT_REQUEST_LIST_DATA::random(rng),
36732            )),
36733            PARAM_EXT_REQUEST_READ_DATA::ID => Some(Self::PARAM_EXT_REQUEST_READ(
36734                PARAM_EXT_REQUEST_READ_DATA::random(rng),
36735            )),
36736            PARAM_EXT_SET_DATA::ID => Some(Self::PARAM_EXT_SET(PARAM_EXT_SET_DATA::random(rng))),
36737            PARAM_EXT_VALUE_DATA::ID => {
36738                Some(Self::PARAM_EXT_VALUE(PARAM_EXT_VALUE_DATA::random(rng)))
36739            }
36740            PARAM_MAP_RC_DATA::ID => Some(Self::PARAM_MAP_RC(PARAM_MAP_RC_DATA::random(rng))),
36741            PARAM_REQUEST_LIST_DATA::ID => Some(Self::PARAM_REQUEST_LIST(
36742                PARAM_REQUEST_LIST_DATA::random(rng),
36743            )),
36744            PARAM_REQUEST_READ_DATA::ID => Some(Self::PARAM_REQUEST_READ(
36745                PARAM_REQUEST_READ_DATA::random(rng),
36746            )),
36747            PARAM_SET_DATA::ID => Some(Self::PARAM_SET(PARAM_SET_DATA::random(rng))),
36748            PARAM_VALUE_DATA::ID => Some(Self::PARAM_VALUE(PARAM_VALUE_DATA::random(rng))),
36749            PING_DATA::ID => Some(Self::PING(PING_DATA::random(rng))),
36750            PLAY_TUNE_DATA::ID => Some(Self::PLAY_TUNE(PLAY_TUNE_DATA::random(rng))),
36751            PLAY_TUNE_V2_DATA::ID => Some(Self::PLAY_TUNE_V2(PLAY_TUNE_V2_DATA::random(rng))),
36752            POSITION_TARGET_GLOBAL_INT_DATA::ID => Some(Self::POSITION_TARGET_GLOBAL_INT(
36753                POSITION_TARGET_GLOBAL_INT_DATA::random(rng),
36754            )),
36755            POSITION_TARGET_LOCAL_NED_DATA::ID => Some(Self::POSITION_TARGET_LOCAL_NED(
36756                POSITION_TARGET_LOCAL_NED_DATA::random(rng),
36757            )),
36758            POWER_STATUS_DATA::ID => Some(Self::POWER_STATUS(POWER_STATUS_DATA::random(rng))),
36759            PROTOCOL_VERSION_DATA::ID => {
36760                Some(Self::PROTOCOL_VERSION(PROTOCOL_VERSION_DATA::random(rng)))
36761            }
36762            RADIO_STATUS_DATA::ID => Some(Self::RADIO_STATUS(RADIO_STATUS_DATA::random(rng))),
36763            RAW_IMU_DATA::ID => Some(Self::RAW_IMU(RAW_IMU_DATA::random(rng))),
36764            RAW_PRESSURE_DATA::ID => Some(Self::RAW_PRESSURE(RAW_PRESSURE_DATA::random(rng))),
36765            RAW_RPM_DATA::ID => Some(Self::RAW_RPM(RAW_RPM_DATA::random(rng))),
36766            RC_CHANNELS_DATA::ID => Some(Self::RC_CHANNELS(RC_CHANNELS_DATA::random(rng))),
36767            RC_CHANNELS_OVERRIDE_DATA::ID => Some(Self::RC_CHANNELS_OVERRIDE(
36768                RC_CHANNELS_OVERRIDE_DATA::random(rng),
36769            )),
36770            RC_CHANNELS_RAW_DATA::ID => {
36771                Some(Self::RC_CHANNELS_RAW(RC_CHANNELS_RAW_DATA::random(rng)))
36772            }
36773            RC_CHANNELS_SCALED_DATA::ID => Some(Self::RC_CHANNELS_SCALED(
36774                RC_CHANNELS_SCALED_DATA::random(rng),
36775            )),
36776            REQUEST_DATA_STREAM_DATA::ID => Some(Self::REQUEST_DATA_STREAM(
36777                REQUEST_DATA_STREAM_DATA::random(rng),
36778            )),
36779            REQUEST_EVENT_DATA::ID => Some(Self::REQUEST_EVENT(REQUEST_EVENT_DATA::random(rng))),
36780            RESOURCE_REQUEST_DATA::ID => {
36781                Some(Self::RESOURCE_REQUEST(RESOURCE_REQUEST_DATA::random(rng)))
36782            }
36783            RESPONSE_EVENT_ERROR_DATA::ID => Some(Self::RESPONSE_EVENT_ERROR(
36784                RESPONSE_EVENT_ERROR_DATA::random(rng),
36785            )),
36786            SAFETY_ALLOWED_AREA_DATA::ID => Some(Self::SAFETY_ALLOWED_AREA(
36787                SAFETY_ALLOWED_AREA_DATA::random(rng),
36788            )),
36789            SAFETY_SET_ALLOWED_AREA_DATA::ID => Some(Self::SAFETY_SET_ALLOWED_AREA(
36790                SAFETY_SET_ALLOWED_AREA_DATA::random(rng),
36791            )),
36792            SATCOM_LINK_STATUS_DATA::ID => Some(Self::SATCOM_LINK_STATUS(
36793                SATCOM_LINK_STATUS_DATA::random(rng),
36794            )),
36795            SCALED_IMU_DATA::ID => Some(Self::SCALED_IMU(SCALED_IMU_DATA::random(rng))),
36796            SCALED_IMU2_DATA::ID => Some(Self::SCALED_IMU2(SCALED_IMU2_DATA::random(rng))),
36797            SCALED_IMU3_DATA::ID => Some(Self::SCALED_IMU3(SCALED_IMU3_DATA::random(rng))),
36798            SCALED_PRESSURE_DATA::ID => {
36799                Some(Self::SCALED_PRESSURE(SCALED_PRESSURE_DATA::random(rng)))
36800            }
36801            SCALED_PRESSURE2_DATA::ID => {
36802                Some(Self::SCALED_PRESSURE2(SCALED_PRESSURE2_DATA::random(rng)))
36803            }
36804            SCALED_PRESSURE3_DATA::ID => {
36805                Some(Self::SCALED_PRESSURE3(SCALED_PRESSURE3_DATA::random(rng)))
36806            }
36807            SENSORPOD_STATUS_DATA::ID => {
36808                Some(Self::SENSORPOD_STATUS(SENSORPOD_STATUS_DATA::random(rng)))
36809            }
36810            SENSOR_AIRFLOW_ANGLES_DATA::ID => Some(Self::SENSOR_AIRFLOW_ANGLES(
36811                SENSOR_AIRFLOW_ANGLES_DATA::random(rng),
36812            )),
36813            SENS_ATMOS_DATA::ID => Some(Self::SENS_ATMOS(SENS_ATMOS_DATA::random(rng))),
36814            SENS_BATMON_DATA::ID => Some(Self::SENS_BATMON(SENS_BATMON_DATA::random(rng))),
36815            SENS_MPPT_DATA::ID => Some(Self::SENS_MPPT(SENS_MPPT_DATA::random(rng))),
36816            SENS_POWER_DATA::ID => Some(Self::SENS_POWER(SENS_POWER_DATA::random(rng))),
36817            SENS_POWER_BOARD_DATA::ID => {
36818                Some(Self::SENS_POWER_BOARD(SENS_POWER_BOARD_DATA::random(rng)))
36819            }
36820            SERIAL_CONTROL_DATA::ID => Some(Self::SERIAL_CONTROL(SERIAL_CONTROL_DATA::random(rng))),
36821            SERVO_OUTPUT_RAW_DATA::ID => {
36822                Some(Self::SERVO_OUTPUT_RAW(SERVO_OUTPUT_RAW_DATA::random(rng)))
36823            }
36824            SETUP_SIGNING_DATA::ID => Some(Self::SETUP_SIGNING(SETUP_SIGNING_DATA::random(rng))),
36825            SET_ACTUATOR_CONTROL_TARGET_DATA::ID => Some(Self::SET_ACTUATOR_CONTROL_TARGET(
36826                SET_ACTUATOR_CONTROL_TARGET_DATA::random(rng),
36827            )),
36828            SET_ATTITUDE_TARGET_DATA::ID => Some(Self::SET_ATTITUDE_TARGET(
36829                SET_ATTITUDE_TARGET_DATA::random(rng),
36830            )),
36831            SET_GPS_GLOBAL_ORIGIN_DATA::ID => Some(Self::SET_GPS_GLOBAL_ORIGIN(
36832                SET_GPS_GLOBAL_ORIGIN_DATA::random(rng),
36833            )),
36834            SET_HOME_POSITION_DATA::ID => {
36835                Some(Self::SET_HOME_POSITION(SET_HOME_POSITION_DATA::random(rng)))
36836            }
36837            SET_MODE_DATA::ID => Some(Self::SET_MODE(SET_MODE_DATA::random(rng))),
36838            SET_POSITION_TARGET_GLOBAL_INT_DATA::ID => Some(Self::SET_POSITION_TARGET_GLOBAL_INT(
36839                SET_POSITION_TARGET_GLOBAL_INT_DATA::random(rng),
36840            )),
36841            SET_POSITION_TARGET_LOCAL_NED_DATA::ID => Some(Self::SET_POSITION_TARGET_LOCAL_NED(
36842                SET_POSITION_TARGET_LOCAL_NED_DATA::random(rng),
36843            )),
36844            SIM_STATE_DATA::ID => Some(Self::SIM_STATE(SIM_STATE_DATA::random(rng))),
36845            SMART_BATTERY_INFO_DATA::ID => Some(Self::SMART_BATTERY_INFO(
36846                SMART_BATTERY_INFO_DATA::random(rng),
36847            )),
36848            STATUSTEXT_DATA::ID => Some(Self::STATUSTEXT(STATUSTEXT_DATA::random(rng))),
36849            STORAGE_INFORMATION_DATA::ID => Some(Self::STORAGE_INFORMATION(
36850                STORAGE_INFORMATION_DATA::random(rng),
36851            )),
36852            SUPPORTED_TUNES_DATA::ID => {
36853                Some(Self::SUPPORTED_TUNES(SUPPORTED_TUNES_DATA::random(rng)))
36854            }
36855            SYSTEM_TIME_DATA::ID => Some(Self::SYSTEM_TIME(SYSTEM_TIME_DATA::random(rng))),
36856            SYS_STATUS_DATA::ID => Some(Self::SYS_STATUS(SYS_STATUS_DATA::random(rng))),
36857            TERRAIN_CHECK_DATA::ID => Some(Self::TERRAIN_CHECK(TERRAIN_CHECK_DATA::random(rng))),
36858            TERRAIN_DATA_DATA::ID => Some(Self::TERRAIN_DATA(TERRAIN_DATA_DATA::random(rng))),
36859            TERRAIN_REPORT_DATA::ID => Some(Self::TERRAIN_REPORT(TERRAIN_REPORT_DATA::random(rng))),
36860            TERRAIN_REQUEST_DATA::ID => {
36861                Some(Self::TERRAIN_REQUEST(TERRAIN_REQUEST_DATA::random(rng)))
36862            }
36863            TIMESYNC_DATA::ID => Some(Self::TIMESYNC(TIMESYNC_DATA::random(rng))),
36864            TIME_ESTIMATE_TO_TARGET_DATA::ID => Some(Self::TIME_ESTIMATE_TO_TARGET(
36865                TIME_ESTIMATE_TO_TARGET_DATA::random(rng),
36866            )),
36867            TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID => {
36868                Some(Self::TRAJECTORY_REPRESENTATION_BEZIER(
36869                    TRAJECTORY_REPRESENTATION_BEZIER_DATA::random(rng),
36870                ))
36871            }
36872            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID => {
36873                Some(Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(
36874                    TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::random(rng),
36875                ))
36876            }
36877            TUNNEL_DATA::ID => Some(Self::TUNNEL(TUNNEL_DATA::random(rng))),
36878            UAVCAN_NODE_INFO_DATA::ID => {
36879                Some(Self::UAVCAN_NODE_INFO(UAVCAN_NODE_INFO_DATA::random(rng)))
36880            }
36881            UAVCAN_NODE_STATUS_DATA::ID => Some(Self::UAVCAN_NODE_STATUS(
36882                UAVCAN_NODE_STATUS_DATA::random(rng),
36883            )),
36884            UTM_GLOBAL_POSITION_DATA::ID => Some(Self::UTM_GLOBAL_POSITION(
36885                UTM_GLOBAL_POSITION_DATA::random(rng),
36886            )),
36887            V2_EXTENSION_DATA::ID => Some(Self::V2_EXTENSION(V2_EXTENSION_DATA::random(rng))),
36888            VFR_HUD_DATA::ID => Some(Self::VFR_HUD(VFR_HUD_DATA::random(rng))),
36889            VIBRATION_DATA::ID => Some(Self::VIBRATION(VIBRATION_DATA::random(rng))),
36890            VICON_POSITION_ESTIMATE_DATA::ID => Some(Self::VICON_POSITION_ESTIMATE(
36891                VICON_POSITION_ESTIMATE_DATA::random(rng),
36892            )),
36893            VIDEO_STREAM_INFORMATION_DATA::ID => Some(Self::VIDEO_STREAM_INFORMATION(
36894                VIDEO_STREAM_INFORMATION_DATA::random(rng),
36895            )),
36896            VIDEO_STREAM_STATUS_DATA::ID => Some(Self::VIDEO_STREAM_STATUS(
36897                VIDEO_STREAM_STATUS_DATA::random(rng),
36898            )),
36899            VISION_POSITION_ESTIMATE_DATA::ID => Some(Self::VISION_POSITION_ESTIMATE(
36900                VISION_POSITION_ESTIMATE_DATA::random(rng),
36901            )),
36902            VISION_SPEED_ESTIMATE_DATA::ID => Some(Self::VISION_SPEED_ESTIMATE(
36903                VISION_SPEED_ESTIMATE_DATA::random(rng),
36904            )),
36905            WHEEL_DISTANCE_DATA::ID => Some(Self::WHEEL_DISTANCE(WHEEL_DISTANCE_DATA::random(rng))),
36906            WIFI_CONFIG_AP_DATA::ID => Some(Self::WIFI_CONFIG_AP(WIFI_CONFIG_AP_DATA::random(rng))),
36907            WINCH_STATUS_DATA::ID => Some(Self::WINCH_STATUS(WINCH_STATUS_DATA::random(rng))),
36908            WIND_COV_DATA::ID => Some(Self::WIND_COV(WIND_COV_DATA::random(rng))),
36909            _ => None,
36910        }
36911    }
36912    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
36913        match self {
36914            Self::ACTUATOR_CONTROL_TARGET(body) => body.ser(version, bytes),
36915            Self::ACTUATOR_OUTPUT_STATUS(body) => body.ser(version, bytes),
36916            Self::ADSB_VEHICLE(body) => body.ser(version, bytes),
36917            Self::AIS_VESSEL(body) => body.ser(version, bytes),
36918            Self::ALTITUDE(body) => body.ser(version, bytes),
36919            Self::ASLCTRL_DATA(body) => body.ser(version, bytes),
36920            Self::ASLCTRL_DEBUG(body) => body.ser(version, bytes),
36921            Self::ASLUAV_STATUS(body) => body.ser(version, bytes),
36922            Self::ASL_OBCTRL(body) => body.ser(version, bytes),
36923            Self::ATTITUDE(body) => body.ser(version, bytes),
36924            Self::ATTITUDE_QUATERNION(body) => body.ser(version, bytes),
36925            Self::ATTITUDE_QUATERNION_COV(body) => body.ser(version, bytes),
36926            Self::ATTITUDE_TARGET(body) => body.ser(version, bytes),
36927            Self::ATT_POS_MOCAP(body) => body.ser(version, bytes),
36928            Self::AUTH_KEY(body) => body.ser(version, bytes),
36929            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(body) => body.ser(version, bytes),
36930            Self::AUTOPILOT_VERSION(body) => body.ser(version, bytes),
36931            Self::AVAILABLE_MODES(body) => body.ser(version, bytes),
36932            Self::AVAILABLE_MODES_MONITOR(body) => body.ser(version, bytes),
36933            Self::BATTERY_INFO(body) => body.ser(version, bytes),
36934            Self::BATTERY_STATUS(body) => body.ser(version, bytes),
36935            Self::BUTTON_CHANGE(body) => body.ser(version, bytes),
36936            Self::CAMERA_CAPTURE_STATUS(body) => body.ser(version, bytes),
36937            Self::CAMERA_FOV_STATUS(body) => body.ser(version, bytes),
36938            Self::CAMERA_IMAGE_CAPTURED(body) => body.ser(version, bytes),
36939            Self::CAMERA_INFORMATION(body) => body.ser(version, bytes),
36940            Self::CAMERA_SETTINGS(body) => body.ser(version, bytes),
36941            Self::CAMERA_THERMAL_RANGE(body) => body.ser(version, bytes),
36942            Self::CAMERA_TRACKING_GEO_STATUS(body) => body.ser(version, bytes),
36943            Self::CAMERA_TRACKING_IMAGE_STATUS(body) => body.ser(version, bytes),
36944            Self::CAMERA_TRIGGER(body) => body.ser(version, bytes),
36945            Self::CANFD_FRAME(body) => body.ser(version, bytes),
36946            Self::CAN_FILTER_MODIFY(body) => body.ser(version, bytes),
36947            Self::CAN_FRAME(body) => body.ser(version, bytes),
36948            Self::CELLULAR_CONFIG(body) => body.ser(version, bytes),
36949            Self::CELLULAR_STATUS(body) => body.ser(version, bytes),
36950            Self::CHANGE_OPERATOR_CONTROL(body) => body.ser(version, bytes),
36951            Self::CHANGE_OPERATOR_CONTROL_ACK(body) => body.ser(version, bytes),
36952            Self::COLLISION(body) => body.ser(version, bytes),
36953            Self::COMMAND_ACK(body) => body.ser(version, bytes),
36954            Self::COMMAND_CANCEL(body) => body.ser(version, bytes),
36955            Self::COMMAND_INT(body) => body.ser(version, bytes),
36956            Self::COMMAND_INT_STAMPED(body) => body.ser(version, bytes),
36957            Self::COMMAND_LONG(body) => body.ser(version, bytes),
36958            Self::COMMAND_LONG_STAMPED(body) => body.ser(version, bytes),
36959            Self::COMPONENT_INFORMATION(body) => body.ser(version, bytes),
36960            Self::COMPONENT_INFORMATION_BASIC(body) => body.ser(version, bytes),
36961            Self::COMPONENT_METADATA(body) => body.ser(version, bytes),
36962            Self::CONTROL_SYSTEM_STATE(body) => body.ser(version, bytes),
36963            Self::CURRENT_EVENT_SEQUENCE(body) => body.ser(version, bytes),
36964            Self::CURRENT_MODE(body) => body.ser(version, bytes),
36965            Self::DATA_STREAM(body) => body.ser(version, bytes),
36966            Self::DATA_TRANSMISSION_HANDSHAKE(body) => body.ser(version, bytes),
36967            Self::DEBUG(body) => body.ser(version, bytes),
36968            Self::DEBUG_FLOAT_ARRAY(body) => body.ser(version, bytes),
36969            Self::DEBUG_VECT(body) => body.ser(version, bytes),
36970            Self::DISTANCE_SENSOR(body) => body.ser(version, bytes),
36971            Self::EFI_STATUS(body) => body.ser(version, bytes),
36972            Self::EKF_EXT(body) => body.ser(version, bytes),
36973            Self::ENCAPSULATED_DATA(body) => body.ser(version, bytes),
36974            Self::ESC_INFO(body) => body.ser(version, bytes),
36975            Self::ESC_STATUS(body) => body.ser(version, bytes),
36976            Self::ESTIMATOR_STATUS(body) => body.ser(version, bytes),
36977            Self::EVENT(body) => body.ser(version, bytes),
36978            Self::EXTENDED_SYS_STATE(body) => body.ser(version, bytes),
36979            Self::FENCE_STATUS(body) => body.ser(version, bytes),
36980            Self::FILE_TRANSFER_PROTOCOL(body) => body.ser(version, bytes),
36981            Self::FLIGHT_INFORMATION(body) => body.ser(version, bytes),
36982            Self::FOLLOW_TARGET(body) => body.ser(version, bytes),
36983            Self::FUEL_STATUS(body) => body.ser(version, bytes),
36984            Self::FW_SOARING_DATA(body) => body.ser(version, bytes),
36985            Self::GENERATOR_STATUS(body) => body.ser(version, bytes),
36986            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(body) => body.ser(version, bytes),
36987            Self::GIMBAL_DEVICE_INFORMATION(body) => body.ser(version, bytes),
36988            Self::GIMBAL_DEVICE_SET_ATTITUDE(body) => body.ser(version, bytes),
36989            Self::GIMBAL_MANAGER_INFORMATION(body) => body.ser(version, bytes),
36990            Self::GIMBAL_MANAGER_SET_ATTITUDE(body) => body.ser(version, bytes),
36991            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(body) => body.ser(version, bytes),
36992            Self::GIMBAL_MANAGER_SET_PITCHYAW(body) => body.ser(version, bytes),
36993            Self::GIMBAL_MANAGER_STATUS(body) => body.ser(version, bytes),
36994            Self::GLOBAL_POSITION_INT(body) => body.ser(version, bytes),
36995            Self::GLOBAL_POSITION_INT_COV(body) => body.ser(version, bytes),
36996            Self::GLOBAL_VISION_POSITION_ESTIMATE(body) => body.ser(version, bytes),
36997            Self::GPS2_RAW(body) => body.ser(version, bytes),
36998            Self::GPS2_RTK(body) => body.ser(version, bytes),
36999            Self::GPS_GLOBAL_ORIGIN(body) => body.ser(version, bytes),
37000            Self::GPS_INJECT_DATA(body) => body.ser(version, bytes),
37001            Self::GPS_INPUT(body) => body.ser(version, bytes),
37002            Self::GPS_RAW_INT(body) => body.ser(version, bytes),
37003            Self::GPS_RTCM_DATA(body) => body.ser(version, bytes),
37004            Self::GPS_RTK(body) => body.ser(version, bytes),
37005            Self::GPS_STATUS(body) => body.ser(version, bytes),
37006            Self::GSM_LINK_STATUS(body) => body.ser(version, bytes),
37007            Self::HEARTBEAT(body) => body.ser(version, bytes),
37008            Self::HIGHRES_IMU(body) => body.ser(version, bytes),
37009            Self::HIGH_LATENCY(body) => body.ser(version, bytes),
37010            Self::HIGH_LATENCY2(body) => body.ser(version, bytes),
37011            Self::HIL_ACTUATOR_CONTROLS(body) => body.ser(version, bytes),
37012            Self::HIL_CONTROLS(body) => body.ser(version, bytes),
37013            Self::HIL_GPS(body) => body.ser(version, bytes),
37014            Self::HIL_OPTICAL_FLOW(body) => body.ser(version, bytes),
37015            Self::HIL_RC_INPUTS_RAW(body) => body.ser(version, bytes),
37016            Self::HIL_SENSOR(body) => body.ser(version, bytes),
37017            Self::HIL_STATE(body) => body.ser(version, bytes),
37018            Self::HIL_STATE_QUATERNION(body) => body.ser(version, bytes),
37019            Self::HOME_POSITION(body) => body.ser(version, bytes),
37020            Self::HYGROMETER_SENSOR(body) => body.ser(version, bytes),
37021            Self::ILLUMINATOR_STATUS(body) => body.ser(version, bytes),
37022            Self::ISBD_LINK_STATUS(body) => body.ser(version, bytes),
37023            Self::LANDING_TARGET(body) => body.ser(version, bytes),
37024            Self::LINK_NODE_STATUS(body) => body.ser(version, bytes),
37025            Self::LOCAL_POSITION_NED(body) => body.ser(version, bytes),
37026            Self::LOCAL_POSITION_NED_COV(body) => body.ser(version, bytes),
37027            Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(body) => body.ser(version, bytes),
37028            Self::LOGGING_ACK(body) => body.ser(version, bytes),
37029            Self::LOGGING_DATA(body) => body.ser(version, bytes),
37030            Self::LOGGING_DATA_ACKED(body) => body.ser(version, bytes),
37031            Self::LOG_DATA(body) => body.ser(version, bytes),
37032            Self::LOG_ENTRY(body) => body.ser(version, bytes),
37033            Self::LOG_ERASE(body) => body.ser(version, bytes),
37034            Self::LOG_REQUEST_DATA(body) => body.ser(version, bytes),
37035            Self::LOG_REQUEST_END(body) => body.ser(version, bytes),
37036            Self::LOG_REQUEST_LIST(body) => body.ser(version, bytes),
37037            Self::MAG_CAL_REPORT(body) => body.ser(version, bytes),
37038            Self::MANUAL_CONTROL(body) => body.ser(version, bytes),
37039            Self::MANUAL_SETPOINT(body) => body.ser(version, bytes),
37040            Self::MEMORY_VECT(body) => body.ser(version, bytes),
37041            Self::MESSAGE_INTERVAL(body) => body.ser(version, bytes),
37042            Self::MISSION_ACK(body) => body.ser(version, bytes),
37043            Self::MISSION_CLEAR_ALL(body) => body.ser(version, bytes),
37044            Self::MISSION_COUNT(body) => body.ser(version, bytes),
37045            Self::MISSION_CURRENT(body) => body.ser(version, bytes),
37046            Self::MISSION_ITEM(body) => body.ser(version, bytes),
37047            Self::MISSION_ITEM_INT(body) => body.ser(version, bytes),
37048            Self::MISSION_ITEM_REACHED(body) => body.ser(version, bytes),
37049            Self::MISSION_REQUEST(body) => body.ser(version, bytes),
37050            Self::MISSION_REQUEST_INT(body) => body.ser(version, bytes),
37051            Self::MISSION_REQUEST_LIST(body) => body.ser(version, bytes),
37052            Self::MISSION_REQUEST_PARTIAL_LIST(body) => body.ser(version, bytes),
37053            Self::MISSION_SET_CURRENT(body) => body.ser(version, bytes),
37054            Self::MISSION_WRITE_PARTIAL_LIST(body) => body.ser(version, bytes),
37055            Self::MOUNT_ORIENTATION(body) => body.ser(version, bytes),
37056            Self::NAMED_VALUE_FLOAT(body) => body.ser(version, bytes),
37057            Self::NAMED_VALUE_INT(body) => body.ser(version, bytes),
37058            Self::NAV_CONTROLLER_OUTPUT(body) => body.ser(version, bytes),
37059            Self::OBSTACLE_DISTANCE(body) => body.ser(version, bytes),
37060            Self::ODOMETRY(body) => body.ser(version, bytes),
37061            Self::ONBOARD_COMPUTER_STATUS(body) => body.ser(version, bytes),
37062            Self::OPEN_DRONE_ID_ARM_STATUS(body) => body.ser(version, bytes),
37063            Self::OPEN_DRONE_ID_AUTHENTICATION(body) => body.ser(version, bytes),
37064            Self::OPEN_DRONE_ID_BASIC_ID(body) => body.ser(version, bytes),
37065            Self::OPEN_DRONE_ID_LOCATION(body) => body.ser(version, bytes),
37066            Self::OPEN_DRONE_ID_MESSAGE_PACK(body) => body.ser(version, bytes),
37067            Self::OPEN_DRONE_ID_OPERATOR_ID(body) => body.ser(version, bytes),
37068            Self::OPEN_DRONE_ID_SELF_ID(body) => body.ser(version, bytes),
37069            Self::OPEN_DRONE_ID_SYSTEM(body) => body.ser(version, bytes),
37070            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(body) => body.ser(version, bytes),
37071            Self::OPTICAL_FLOW(body) => body.ser(version, bytes),
37072            Self::OPTICAL_FLOW_RAD(body) => body.ser(version, bytes),
37073            Self::ORBIT_EXECUTION_STATUS(body) => body.ser(version, bytes),
37074            Self::PARAM_EXT_ACK(body) => body.ser(version, bytes),
37075            Self::PARAM_EXT_REQUEST_LIST(body) => body.ser(version, bytes),
37076            Self::PARAM_EXT_REQUEST_READ(body) => body.ser(version, bytes),
37077            Self::PARAM_EXT_SET(body) => body.ser(version, bytes),
37078            Self::PARAM_EXT_VALUE(body) => body.ser(version, bytes),
37079            Self::PARAM_MAP_RC(body) => body.ser(version, bytes),
37080            Self::PARAM_REQUEST_LIST(body) => body.ser(version, bytes),
37081            Self::PARAM_REQUEST_READ(body) => body.ser(version, bytes),
37082            Self::PARAM_SET(body) => body.ser(version, bytes),
37083            Self::PARAM_VALUE(body) => body.ser(version, bytes),
37084            Self::PING(body) => body.ser(version, bytes),
37085            Self::PLAY_TUNE(body) => body.ser(version, bytes),
37086            Self::PLAY_TUNE_V2(body) => body.ser(version, bytes),
37087            Self::POSITION_TARGET_GLOBAL_INT(body) => body.ser(version, bytes),
37088            Self::POSITION_TARGET_LOCAL_NED(body) => body.ser(version, bytes),
37089            Self::POWER_STATUS(body) => body.ser(version, bytes),
37090            Self::PROTOCOL_VERSION(body) => body.ser(version, bytes),
37091            Self::RADIO_STATUS(body) => body.ser(version, bytes),
37092            Self::RAW_IMU(body) => body.ser(version, bytes),
37093            Self::RAW_PRESSURE(body) => body.ser(version, bytes),
37094            Self::RAW_RPM(body) => body.ser(version, bytes),
37095            Self::RC_CHANNELS(body) => body.ser(version, bytes),
37096            Self::RC_CHANNELS_OVERRIDE(body) => body.ser(version, bytes),
37097            Self::RC_CHANNELS_RAW(body) => body.ser(version, bytes),
37098            Self::RC_CHANNELS_SCALED(body) => body.ser(version, bytes),
37099            Self::REQUEST_DATA_STREAM(body) => body.ser(version, bytes),
37100            Self::REQUEST_EVENT(body) => body.ser(version, bytes),
37101            Self::RESOURCE_REQUEST(body) => body.ser(version, bytes),
37102            Self::RESPONSE_EVENT_ERROR(body) => body.ser(version, bytes),
37103            Self::SAFETY_ALLOWED_AREA(body) => body.ser(version, bytes),
37104            Self::SAFETY_SET_ALLOWED_AREA(body) => body.ser(version, bytes),
37105            Self::SATCOM_LINK_STATUS(body) => body.ser(version, bytes),
37106            Self::SCALED_IMU(body) => body.ser(version, bytes),
37107            Self::SCALED_IMU2(body) => body.ser(version, bytes),
37108            Self::SCALED_IMU3(body) => body.ser(version, bytes),
37109            Self::SCALED_PRESSURE(body) => body.ser(version, bytes),
37110            Self::SCALED_PRESSURE2(body) => body.ser(version, bytes),
37111            Self::SCALED_PRESSURE3(body) => body.ser(version, bytes),
37112            Self::SENSORPOD_STATUS(body) => body.ser(version, bytes),
37113            Self::SENSOR_AIRFLOW_ANGLES(body) => body.ser(version, bytes),
37114            Self::SENS_ATMOS(body) => body.ser(version, bytes),
37115            Self::SENS_BATMON(body) => body.ser(version, bytes),
37116            Self::SENS_MPPT(body) => body.ser(version, bytes),
37117            Self::SENS_POWER(body) => body.ser(version, bytes),
37118            Self::SENS_POWER_BOARD(body) => body.ser(version, bytes),
37119            Self::SERIAL_CONTROL(body) => body.ser(version, bytes),
37120            Self::SERVO_OUTPUT_RAW(body) => body.ser(version, bytes),
37121            Self::SETUP_SIGNING(body) => body.ser(version, bytes),
37122            Self::SET_ACTUATOR_CONTROL_TARGET(body) => body.ser(version, bytes),
37123            Self::SET_ATTITUDE_TARGET(body) => body.ser(version, bytes),
37124            Self::SET_GPS_GLOBAL_ORIGIN(body) => body.ser(version, bytes),
37125            Self::SET_HOME_POSITION(body) => body.ser(version, bytes),
37126            Self::SET_MODE(body) => body.ser(version, bytes),
37127            Self::SET_POSITION_TARGET_GLOBAL_INT(body) => body.ser(version, bytes),
37128            Self::SET_POSITION_TARGET_LOCAL_NED(body) => body.ser(version, bytes),
37129            Self::SIM_STATE(body) => body.ser(version, bytes),
37130            Self::SMART_BATTERY_INFO(body) => body.ser(version, bytes),
37131            Self::STATUSTEXT(body) => body.ser(version, bytes),
37132            Self::STORAGE_INFORMATION(body) => body.ser(version, bytes),
37133            Self::SUPPORTED_TUNES(body) => body.ser(version, bytes),
37134            Self::SYSTEM_TIME(body) => body.ser(version, bytes),
37135            Self::SYS_STATUS(body) => body.ser(version, bytes),
37136            Self::TERRAIN_CHECK(body) => body.ser(version, bytes),
37137            Self::TERRAIN_DATA(body) => body.ser(version, bytes),
37138            Self::TERRAIN_REPORT(body) => body.ser(version, bytes),
37139            Self::TERRAIN_REQUEST(body) => body.ser(version, bytes),
37140            Self::TIMESYNC(body) => body.ser(version, bytes),
37141            Self::TIME_ESTIMATE_TO_TARGET(body) => body.ser(version, bytes),
37142            Self::TRAJECTORY_REPRESENTATION_BEZIER(body) => body.ser(version, bytes),
37143            Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(body) => body.ser(version, bytes),
37144            Self::TUNNEL(body) => body.ser(version, bytes),
37145            Self::UAVCAN_NODE_INFO(body) => body.ser(version, bytes),
37146            Self::UAVCAN_NODE_STATUS(body) => body.ser(version, bytes),
37147            Self::UTM_GLOBAL_POSITION(body) => body.ser(version, bytes),
37148            Self::V2_EXTENSION(body) => body.ser(version, bytes),
37149            Self::VFR_HUD(body) => body.ser(version, bytes),
37150            Self::VIBRATION(body) => body.ser(version, bytes),
37151            Self::VICON_POSITION_ESTIMATE(body) => body.ser(version, bytes),
37152            Self::VIDEO_STREAM_INFORMATION(body) => body.ser(version, bytes),
37153            Self::VIDEO_STREAM_STATUS(body) => body.ser(version, bytes),
37154            Self::VISION_POSITION_ESTIMATE(body) => body.ser(version, bytes),
37155            Self::VISION_SPEED_ESTIMATE(body) => body.ser(version, bytes),
37156            Self::WHEEL_DISTANCE(body) => body.ser(version, bytes),
37157            Self::WIFI_CONFIG_AP(body) => body.ser(version, bytes),
37158            Self::WINCH_STATUS(body) => body.ser(version, bytes),
37159            Self::WIND_COV(body) => body.ser(version, bytes),
37160        }
37161    }
37162    fn extra_crc(id: u32) -> u8 {
37163        match id {
37164            ACTUATOR_CONTROL_TARGET_DATA::ID => ACTUATOR_CONTROL_TARGET_DATA::EXTRA_CRC,
37165            ACTUATOR_OUTPUT_STATUS_DATA::ID => ACTUATOR_OUTPUT_STATUS_DATA::EXTRA_CRC,
37166            ADSB_VEHICLE_DATA::ID => ADSB_VEHICLE_DATA::EXTRA_CRC,
37167            AIS_VESSEL_DATA::ID => AIS_VESSEL_DATA::EXTRA_CRC,
37168            ALTITUDE_DATA::ID => ALTITUDE_DATA::EXTRA_CRC,
37169            ASLCTRL_DATA_DATA::ID => ASLCTRL_DATA_DATA::EXTRA_CRC,
37170            ASLCTRL_DEBUG_DATA::ID => ASLCTRL_DEBUG_DATA::EXTRA_CRC,
37171            ASLUAV_STATUS_DATA::ID => ASLUAV_STATUS_DATA::EXTRA_CRC,
37172            ASL_OBCTRL_DATA::ID => ASL_OBCTRL_DATA::EXTRA_CRC,
37173            ATTITUDE_DATA::ID => ATTITUDE_DATA::EXTRA_CRC,
37174            ATTITUDE_QUATERNION_DATA::ID => ATTITUDE_QUATERNION_DATA::EXTRA_CRC,
37175            ATTITUDE_QUATERNION_COV_DATA::ID => ATTITUDE_QUATERNION_COV_DATA::EXTRA_CRC,
37176            ATTITUDE_TARGET_DATA::ID => ATTITUDE_TARGET_DATA::EXTRA_CRC,
37177            ATT_POS_MOCAP_DATA::ID => ATT_POS_MOCAP_DATA::EXTRA_CRC,
37178            AUTH_KEY_DATA::ID => AUTH_KEY_DATA::EXTRA_CRC,
37179            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID => {
37180                AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::EXTRA_CRC
37181            }
37182            AUTOPILOT_VERSION_DATA::ID => AUTOPILOT_VERSION_DATA::EXTRA_CRC,
37183            AVAILABLE_MODES_DATA::ID => AVAILABLE_MODES_DATA::EXTRA_CRC,
37184            AVAILABLE_MODES_MONITOR_DATA::ID => AVAILABLE_MODES_MONITOR_DATA::EXTRA_CRC,
37185            BATTERY_INFO_DATA::ID => BATTERY_INFO_DATA::EXTRA_CRC,
37186            BATTERY_STATUS_DATA::ID => BATTERY_STATUS_DATA::EXTRA_CRC,
37187            BUTTON_CHANGE_DATA::ID => BUTTON_CHANGE_DATA::EXTRA_CRC,
37188            CAMERA_CAPTURE_STATUS_DATA::ID => CAMERA_CAPTURE_STATUS_DATA::EXTRA_CRC,
37189            CAMERA_FOV_STATUS_DATA::ID => CAMERA_FOV_STATUS_DATA::EXTRA_CRC,
37190            CAMERA_IMAGE_CAPTURED_DATA::ID => CAMERA_IMAGE_CAPTURED_DATA::EXTRA_CRC,
37191            CAMERA_INFORMATION_DATA::ID => CAMERA_INFORMATION_DATA::EXTRA_CRC,
37192            CAMERA_SETTINGS_DATA::ID => CAMERA_SETTINGS_DATA::EXTRA_CRC,
37193            CAMERA_THERMAL_RANGE_DATA::ID => CAMERA_THERMAL_RANGE_DATA::EXTRA_CRC,
37194            CAMERA_TRACKING_GEO_STATUS_DATA::ID => CAMERA_TRACKING_GEO_STATUS_DATA::EXTRA_CRC,
37195            CAMERA_TRACKING_IMAGE_STATUS_DATA::ID => CAMERA_TRACKING_IMAGE_STATUS_DATA::EXTRA_CRC,
37196            CAMERA_TRIGGER_DATA::ID => CAMERA_TRIGGER_DATA::EXTRA_CRC,
37197            CANFD_FRAME_DATA::ID => CANFD_FRAME_DATA::EXTRA_CRC,
37198            CAN_FILTER_MODIFY_DATA::ID => CAN_FILTER_MODIFY_DATA::EXTRA_CRC,
37199            CAN_FRAME_DATA::ID => CAN_FRAME_DATA::EXTRA_CRC,
37200            CELLULAR_CONFIG_DATA::ID => CELLULAR_CONFIG_DATA::EXTRA_CRC,
37201            CELLULAR_STATUS_DATA::ID => CELLULAR_STATUS_DATA::EXTRA_CRC,
37202            CHANGE_OPERATOR_CONTROL_DATA::ID => CHANGE_OPERATOR_CONTROL_DATA::EXTRA_CRC,
37203            CHANGE_OPERATOR_CONTROL_ACK_DATA::ID => CHANGE_OPERATOR_CONTROL_ACK_DATA::EXTRA_CRC,
37204            COLLISION_DATA::ID => COLLISION_DATA::EXTRA_CRC,
37205            COMMAND_ACK_DATA::ID => COMMAND_ACK_DATA::EXTRA_CRC,
37206            COMMAND_CANCEL_DATA::ID => COMMAND_CANCEL_DATA::EXTRA_CRC,
37207            COMMAND_INT_DATA::ID => COMMAND_INT_DATA::EXTRA_CRC,
37208            COMMAND_INT_STAMPED_DATA::ID => COMMAND_INT_STAMPED_DATA::EXTRA_CRC,
37209            COMMAND_LONG_DATA::ID => COMMAND_LONG_DATA::EXTRA_CRC,
37210            COMMAND_LONG_STAMPED_DATA::ID => COMMAND_LONG_STAMPED_DATA::EXTRA_CRC,
37211            COMPONENT_INFORMATION_DATA::ID => COMPONENT_INFORMATION_DATA::EXTRA_CRC,
37212            COMPONENT_INFORMATION_BASIC_DATA::ID => COMPONENT_INFORMATION_BASIC_DATA::EXTRA_CRC,
37213            COMPONENT_METADATA_DATA::ID => COMPONENT_METADATA_DATA::EXTRA_CRC,
37214            CONTROL_SYSTEM_STATE_DATA::ID => CONTROL_SYSTEM_STATE_DATA::EXTRA_CRC,
37215            CURRENT_EVENT_SEQUENCE_DATA::ID => CURRENT_EVENT_SEQUENCE_DATA::EXTRA_CRC,
37216            CURRENT_MODE_DATA::ID => CURRENT_MODE_DATA::EXTRA_CRC,
37217            DATA_STREAM_DATA::ID => DATA_STREAM_DATA::EXTRA_CRC,
37218            DATA_TRANSMISSION_HANDSHAKE_DATA::ID => DATA_TRANSMISSION_HANDSHAKE_DATA::EXTRA_CRC,
37219            DEBUG_DATA::ID => DEBUG_DATA::EXTRA_CRC,
37220            DEBUG_FLOAT_ARRAY_DATA::ID => DEBUG_FLOAT_ARRAY_DATA::EXTRA_CRC,
37221            DEBUG_VECT_DATA::ID => DEBUG_VECT_DATA::EXTRA_CRC,
37222            DISTANCE_SENSOR_DATA::ID => DISTANCE_SENSOR_DATA::EXTRA_CRC,
37223            EFI_STATUS_DATA::ID => EFI_STATUS_DATA::EXTRA_CRC,
37224            EKF_EXT_DATA::ID => EKF_EXT_DATA::EXTRA_CRC,
37225            ENCAPSULATED_DATA_DATA::ID => ENCAPSULATED_DATA_DATA::EXTRA_CRC,
37226            ESC_INFO_DATA::ID => ESC_INFO_DATA::EXTRA_CRC,
37227            ESC_STATUS_DATA::ID => ESC_STATUS_DATA::EXTRA_CRC,
37228            ESTIMATOR_STATUS_DATA::ID => ESTIMATOR_STATUS_DATA::EXTRA_CRC,
37229            EVENT_DATA::ID => EVENT_DATA::EXTRA_CRC,
37230            EXTENDED_SYS_STATE_DATA::ID => EXTENDED_SYS_STATE_DATA::EXTRA_CRC,
37231            FENCE_STATUS_DATA::ID => FENCE_STATUS_DATA::EXTRA_CRC,
37232            FILE_TRANSFER_PROTOCOL_DATA::ID => FILE_TRANSFER_PROTOCOL_DATA::EXTRA_CRC,
37233            FLIGHT_INFORMATION_DATA::ID => FLIGHT_INFORMATION_DATA::EXTRA_CRC,
37234            FOLLOW_TARGET_DATA::ID => FOLLOW_TARGET_DATA::EXTRA_CRC,
37235            FUEL_STATUS_DATA::ID => FUEL_STATUS_DATA::EXTRA_CRC,
37236            FW_SOARING_DATA_DATA::ID => FW_SOARING_DATA_DATA::EXTRA_CRC,
37237            GENERATOR_STATUS_DATA::ID => GENERATOR_STATUS_DATA::EXTRA_CRC,
37238            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID => GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::EXTRA_CRC,
37239            GIMBAL_DEVICE_INFORMATION_DATA::ID => GIMBAL_DEVICE_INFORMATION_DATA::EXTRA_CRC,
37240            GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID => GIMBAL_DEVICE_SET_ATTITUDE_DATA::EXTRA_CRC,
37241            GIMBAL_MANAGER_INFORMATION_DATA::ID => GIMBAL_MANAGER_INFORMATION_DATA::EXTRA_CRC,
37242            GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID => GIMBAL_MANAGER_SET_ATTITUDE_DATA::EXTRA_CRC,
37243            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID => {
37244                GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::EXTRA_CRC
37245            }
37246            GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID => GIMBAL_MANAGER_SET_PITCHYAW_DATA::EXTRA_CRC,
37247            GIMBAL_MANAGER_STATUS_DATA::ID => GIMBAL_MANAGER_STATUS_DATA::EXTRA_CRC,
37248            GLOBAL_POSITION_INT_DATA::ID => GLOBAL_POSITION_INT_DATA::EXTRA_CRC,
37249            GLOBAL_POSITION_INT_COV_DATA::ID => GLOBAL_POSITION_INT_COV_DATA::EXTRA_CRC,
37250            GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID => {
37251                GLOBAL_VISION_POSITION_ESTIMATE_DATA::EXTRA_CRC
37252            }
37253            GPS2_RAW_DATA::ID => GPS2_RAW_DATA::EXTRA_CRC,
37254            GPS2_RTK_DATA::ID => GPS2_RTK_DATA::EXTRA_CRC,
37255            GPS_GLOBAL_ORIGIN_DATA::ID => GPS_GLOBAL_ORIGIN_DATA::EXTRA_CRC,
37256            GPS_INJECT_DATA_DATA::ID => GPS_INJECT_DATA_DATA::EXTRA_CRC,
37257            GPS_INPUT_DATA::ID => GPS_INPUT_DATA::EXTRA_CRC,
37258            GPS_RAW_INT_DATA::ID => GPS_RAW_INT_DATA::EXTRA_CRC,
37259            GPS_RTCM_DATA_DATA::ID => GPS_RTCM_DATA_DATA::EXTRA_CRC,
37260            GPS_RTK_DATA::ID => GPS_RTK_DATA::EXTRA_CRC,
37261            GPS_STATUS_DATA::ID => GPS_STATUS_DATA::EXTRA_CRC,
37262            GSM_LINK_STATUS_DATA::ID => GSM_LINK_STATUS_DATA::EXTRA_CRC,
37263            HEARTBEAT_DATA::ID => HEARTBEAT_DATA::EXTRA_CRC,
37264            HIGHRES_IMU_DATA::ID => HIGHRES_IMU_DATA::EXTRA_CRC,
37265            HIGH_LATENCY_DATA::ID => HIGH_LATENCY_DATA::EXTRA_CRC,
37266            HIGH_LATENCY2_DATA::ID => HIGH_LATENCY2_DATA::EXTRA_CRC,
37267            HIL_ACTUATOR_CONTROLS_DATA::ID => HIL_ACTUATOR_CONTROLS_DATA::EXTRA_CRC,
37268            HIL_CONTROLS_DATA::ID => HIL_CONTROLS_DATA::EXTRA_CRC,
37269            HIL_GPS_DATA::ID => HIL_GPS_DATA::EXTRA_CRC,
37270            HIL_OPTICAL_FLOW_DATA::ID => HIL_OPTICAL_FLOW_DATA::EXTRA_CRC,
37271            HIL_RC_INPUTS_RAW_DATA::ID => HIL_RC_INPUTS_RAW_DATA::EXTRA_CRC,
37272            HIL_SENSOR_DATA::ID => HIL_SENSOR_DATA::EXTRA_CRC,
37273            HIL_STATE_DATA::ID => HIL_STATE_DATA::EXTRA_CRC,
37274            HIL_STATE_QUATERNION_DATA::ID => HIL_STATE_QUATERNION_DATA::EXTRA_CRC,
37275            HOME_POSITION_DATA::ID => HOME_POSITION_DATA::EXTRA_CRC,
37276            HYGROMETER_SENSOR_DATA::ID => HYGROMETER_SENSOR_DATA::EXTRA_CRC,
37277            ILLUMINATOR_STATUS_DATA::ID => ILLUMINATOR_STATUS_DATA::EXTRA_CRC,
37278            ISBD_LINK_STATUS_DATA::ID => ISBD_LINK_STATUS_DATA::EXTRA_CRC,
37279            LANDING_TARGET_DATA::ID => LANDING_TARGET_DATA::EXTRA_CRC,
37280            LINK_NODE_STATUS_DATA::ID => LINK_NODE_STATUS_DATA::EXTRA_CRC,
37281            LOCAL_POSITION_NED_DATA::ID => LOCAL_POSITION_NED_DATA::EXTRA_CRC,
37282            LOCAL_POSITION_NED_COV_DATA::ID => LOCAL_POSITION_NED_COV_DATA::EXTRA_CRC,
37283            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID => {
37284                LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::EXTRA_CRC
37285            }
37286            LOGGING_ACK_DATA::ID => LOGGING_ACK_DATA::EXTRA_CRC,
37287            LOGGING_DATA_DATA::ID => LOGGING_DATA_DATA::EXTRA_CRC,
37288            LOGGING_DATA_ACKED_DATA::ID => LOGGING_DATA_ACKED_DATA::EXTRA_CRC,
37289            LOG_DATA_DATA::ID => LOG_DATA_DATA::EXTRA_CRC,
37290            LOG_ENTRY_DATA::ID => LOG_ENTRY_DATA::EXTRA_CRC,
37291            LOG_ERASE_DATA::ID => LOG_ERASE_DATA::EXTRA_CRC,
37292            LOG_REQUEST_DATA_DATA::ID => LOG_REQUEST_DATA_DATA::EXTRA_CRC,
37293            LOG_REQUEST_END_DATA::ID => LOG_REQUEST_END_DATA::EXTRA_CRC,
37294            LOG_REQUEST_LIST_DATA::ID => LOG_REQUEST_LIST_DATA::EXTRA_CRC,
37295            MAG_CAL_REPORT_DATA::ID => MAG_CAL_REPORT_DATA::EXTRA_CRC,
37296            MANUAL_CONTROL_DATA::ID => MANUAL_CONTROL_DATA::EXTRA_CRC,
37297            MANUAL_SETPOINT_DATA::ID => MANUAL_SETPOINT_DATA::EXTRA_CRC,
37298            MEMORY_VECT_DATA::ID => MEMORY_VECT_DATA::EXTRA_CRC,
37299            MESSAGE_INTERVAL_DATA::ID => MESSAGE_INTERVAL_DATA::EXTRA_CRC,
37300            MISSION_ACK_DATA::ID => MISSION_ACK_DATA::EXTRA_CRC,
37301            MISSION_CLEAR_ALL_DATA::ID => MISSION_CLEAR_ALL_DATA::EXTRA_CRC,
37302            MISSION_COUNT_DATA::ID => MISSION_COUNT_DATA::EXTRA_CRC,
37303            MISSION_CURRENT_DATA::ID => MISSION_CURRENT_DATA::EXTRA_CRC,
37304            MISSION_ITEM_DATA::ID => MISSION_ITEM_DATA::EXTRA_CRC,
37305            MISSION_ITEM_INT_DATA::ID => MISSION_ITEM_INT_DATA::EXTRA_CRC,
37306            MISSION_ITEM_REACHED_DATA::ID => MISSION_ITEM_REACHED_DATA::EXTRA_CRC,
37307            MISSION_REQUEST_DATA::ID => MISSION_REQUEST_DATA::EXTRA_CRC,
37308            MISSION_REQUEST_INT_DATA::ID => MISSION_REQUEST_INT_DATA::EXTRA_CRC,
37309            MISSION_REQUEST_LIST_DATA::ID => MISSION_REQUEST_LIST_DATA::EXTRA_CRC,
37310            MISSION_REQUEST_PARTIAL_LIST_DATA::ID => MISSION_REQUEST_PARTIAL_LIST_DATA::EXTRA_CRC,
37311            MISSION_SET_CURRENT_DATA::ID => MISSION_SET_CURRENT_DATA::EXTRA_CRC,
37312            MISSION_WRITE_PARTIAL_LIST_DATA::ID => MISSION_WRITE_PARTIAL_LIST_DATA::EXTRA_CRC,
37313            MOUNT_ORIENTATION_DATA::ID => MOUNT_ORIENTATION_DATA::EXTRA_CRC,
37314            NAMED_VALUE_FLOAT_DATA::ID => NAMED_VALUE_FLOAT_DATA::EXTRA_CRC,
37315            NAMED_VALUE_INT_DATA::ID => NAMED_VALUE_INT_DATA::EXTRA_CRC,
37316            NAV_CONTROLLER_OUTPUT_DATA::ID => NAV_CONTROLLER_OUTPUT_DATA::EXTRA_CRC,
37317            OBSTACLE_DISTANCE_DATA::ID => OBSTACLE_DISTANCE_DATA::EXTRA_CRC,
37318            ODOMETRY_DATA::ID => ODOMETRY_DATA::EXTRA_CRC,
37319            ONBOARD_COMPUTER_STATUS_DATA::ID => ONBOARD_COMPUTER_STATUS_DATA::EXTRA_CRC,
37320            OPEN_DRONE_ID_ARM_STATUS_DATA::ID => OPEN_DRONE_ID_ARM_STATUS_DATA::EXTRA_CRC,
37321            OPEN_DRONE_ID_AUTHENTICATION_DATA::ID => OPEN_DRONE_ID_AUTHENTICATION_DATA::EXTRA_CRC,
37322            OPEN_DRONE_ID_BASIC_ID_DATA::ID => OPEN_DRONE_ID_BASIC_ID_DATA::EXTRA_CRC,
37323            OPEN_DRONE_ID_LOCATION_DATA::ID => OPEN_DRONE_ID_LOCATION_DATA::EXTRA_CRC,
37324            OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID => OPEN_DRONE_ID_MESSAGE_PACK_DATA::EXTRA_CRC,
37325            OPEN_DRONE_ID_OPERATOR_ID_DATA::ID => OPEN_DRONE_ID_OPERATOR_ID_DATA::EXTRA_CRC,
37326            OPEN_DRONE_ID_SELF_ID_DATA::ID => OPEN_DRONE_ID_SELF_ID_DATA::EXTRA_CRC,
37327            OPEN_DRONE_ID_SYSTEM_DATA::ID => OPEN_DRONE_ID_SYSTEM_DATA::EXTRA_CRC,
37328            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID => OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::EXTRA_CRC,
37329            OPTICAL_FLOW_DATA::ID => OPTICAL_FLOW_DATA::EXTRA_CRC,
37330            OPTICAL_FLOW_RAD_DATA::ID => OPTICAL_FLOW_RAD_DATA::EXTRA_CRC,
37331            ORBIT_EXECUTION_STATUS_DATA::ID => ORBIT_EXECUTION_STATUS_DATA::EXTRA_CRC,
37332            PARAM_EXT_ACK_DATA::ID => PARAM_EXT_ACK_DATA::EXTRA_CRC,
37333            PARAM_EXT_REQUEST_LIST_DATA::ID => PARAM_EXT_REQUEST_LIST_DATA::EXTRA_CRC,
37334            PARAM_EXT_REQUEST_READ_DATA::ID => PARAM_EXT_REQUEST_READ_DATA::EXTRA_CRC,
37335            PARAM_EXT_SET_DATA::ID => PARAM_EXT_SET_DATA::EXTRA_CRC,
37336            PARAM_EXT_VALUE_DATA::ID => PARAM_EXT_VALUE_DATA::EXTRA_CRC,
37337            PARAM_MAP_RC_DATA::ID => PARAM_MAP_RC_DATA::EXTRA_CRC,
37338            PARAM_REQUEST_LIST_DATA::ID => PARAM_REQUEST_LIST_DATA::EXTRA_CRC,
37339            PARAM_REQUEST_READ_DATA::ID => PARAM_REQUEST_READ_DATA::EXTRA_CRC,
37340            PARAM_SET_DATA::ID => PARAM_SET_DATA::EXTRA_CRC,
37341            PARAM_VALUE_DATA::ID => PARAM_VALUE_DATA::EXTRA_CRC,
37342            PING_DATA::ID => PING_DATA::EXTRA_CRC,
37343            PLAY_TUNE_DATA::ID => PLAY_TUNE_DATA::EXTRA_CRC,
37344            PLAY_TUNE_V2_DATA::ID => PLAY_TUNE_V2_DATA::EXTRA_CRC,
37345            POSITION_TARGET_GLOBAL_INT_DATA::ID => POSITION_TARGET_GLOBAL_INT_DATA::EXTRA_CRC,
37346            POSITION_TARGET_LOCAL_NED_DATA::ID => POSITION_TARGET_LOCAL_NED_DATA::EXTRA_CRC,
37347            POWER_STATUS_DATA::ID => POWER_STATUS_DATA::EXTRA_CRC,
37348            PROTOCOL_VERSION_DATA::ID => PROTOCOL_VERSION_DATA::EXTRA_CRC,
37349            RADIO_STATUS_DATA::ID => RADIO_STATUS_DATA::EXTRA_CRC,
37350            RAW_IMU_DATA::ID => RAW_IMU_DATA::EXTRA_CRC,
37351            RAW_PRESSURE_DATA::ID => RAW_PRESSURE_DATA::EXTRA_CRC,
37352            RAW_RPM_DATA::ID => RAW_RPM_DATA::EXTRA_CRC,
37353            RC_CHANNELS_DATA::ID => RC_CHANNELS_DATA::EXTRA_CRC,
37354            RC_CHANNELS_OVERRIDE_DATA::ID => RC_CHANNELS_OVERRIDE_DATA::EXTRA_CRC,
37355            RC_CHANNELS_RAW_DATA::ID => RC_CHANNELS_RAW_DATA::EXTRA_CRC,
37356            RC_CHANNELS_SCALED_DATA::ID => RC_CHANNELS_SCALED_DATA::EXTRA_CRC,
37357            REQUEST_DATA_STREAM_DATA::ID => REQUEST_DATA_STREAM_DATA::EXTRA_CRC,
37358            REQUEST_EVENT_DATA::ID => REQUEST_EVENT_DATA::EXTRA_CRC,
37359            RESOURCE_REQUEST_DATA::ID => RESOURCE_REQUEST_DATA::EXTRA_CRC,
37360            RESPONSE_EVENT_ERROR_DATA::ID => RESPONSE_EVENT_ERROR_DATA::EXTRA_CRC,
37361            SAFETY_ALLOWED_AREA_DATA::ID => SAFETY_ALLOWED_AREA_DATA::EXTRA_CRC,
37362            SAFETY_SET_ALLOWED_AREA_DATA::ID => SAFETY_SET_ALLOWED_AREA_DATA::EXTRA_CRC,
37363            SATCOM_LINK_STATUS_DATA::ID => SATCOM_LINK_STATUS_DATA::EXTRA_CRC,
37364            SCALED_IMU_DATA::ID => SCALED_IMU_DATA::EXTRA_CRC,
37365            SCALED_IMU2_DATA::ID => SCALED_IMU2_DATA::EXTRA_CRC,
37366            SCALED_IMU3_DATA::ID => SCALED_IMU3_DATA::EXTRA_CRC,
37367            SCALED_PRESSURE_DATA::ID => SCALED_PRESSURE_DATA::EXTRA_CRC,
37368            SCALED_PRESSURE2_DATA::ID => SCALED_PRESSURE2_DATA::EXTRA_CRC,
37369            SCALED_PRESSURE3_DATA::ID => SCALED_PRESSURE3_DATA::EXTRA_CRC,
37370            SENSORPOD_STATUS_DATA::ID => SENSORPOD_STATUS_DATA::EXTRA_CRC,
37371            SENSOR_AIRFLOW_ANGLES_DATA::ID => SENSOR_AIRFLOW_ANGLES_DATA::EXTRA_CRC,
37372            SENS_ATMOS_DATA::ID => SENS_ATMOS_DATA::EXTRA_CRC,
37373            SENS_BATMON_DATA::ID => SENS_BATMON_DATA::EXTRA_CRC,
37374            SENS_MPPT_DATA::ID => SENS_MPPT_DATA::EXTRA_CRC,
37375            SENS_POWER_DATA::ID => SENS_POWER_DATA::EXTRA_CRC,
37376            SENS_POWER_BOARD_DATA::ID => SENS_POWER_BOARD_DATA::EXTRA_CRC,
37377            SERIAL_CONTROL_DATA::ID => SERIAL_CONTROL_DATA::EXTRA_CRC,
37378            SERVO_OUTPUT_RAW_DATA::ID => SERVO_OUTPUT_RAW_DATA::EXTRA_CRC,
37379            SETUP_SIGNING_DATA::ID => SETUP_SIGNING_DATA::EXTRA_CRC,
37380            SET_ACTUATOR_CONTROL_TARGET_DATA::ID => SET_ACTUATOR_CONTROL_TARGET_DATA::EXTRA_CRC,
37381            SET_ATTITUDE_TARGET_DATA::ID => SET_ATTITUDE_TARGET_DATA::EXTRA_CRC,
37382            SET_GPS_GLOBAL_ORIGIN_DATA::ID => SET_GPS_GLOBAL_ORIGIN_DATA::EXTRA_CRC,
37383            SET_HOME_POSITION_DATA::ID => SET_HOME_POSITION_DATA::EXTRA_CRC,
37384            SET_MODE_DATA::ID => SET_MODE_DATA::EXTRA_CRC,
37385            SET_POSITION_TARGET_GLOBAL_INT_DATA::ID => {
37386                SET_POSITION_TARGET_GLOBAL_INT_DATA::EXTRA_CRC
37387            }
37388            SET_POSITION_TARGET_LOCAL_NED_DATA::ID => SET_POSITION_TARGET_LOCAL_NED_DATA::EXTRA_CRC,
37389            SIM_STATE_DATA::ID => SIM_STATE_DATA::EXTRA_CRC,
37390            SMART_BATTERY_INFO_DATA::ID => SMART_BATTERY_INFO_DATA::EXTRA_CRC,
37391            STATUSTEXT_DATA::ID => STATUSTEXT_DATA::EXTRA_CRC,
37392            STORAGE_INFORMATION_DATA::ID => STORAGE_INFORMATION_DATA::EXTRA_CRC,
37393            SUPPORTED_TUNES_DATA::ID => SUPPORTED_TUNES_DATA::EXTRA_CRC,
37394            SYSTEM_TIME_DATA::ID => SYSTEM_TIME_DATA::EXTRA_CRC,
37395            SYS_STATUS_DATA::ID => SYS_STATUS_DATA::EXTRA_CRC,
37396            TERRAIN_CHECK_DATA::ID => TERRAIN_CHECK_DATA::EXTRA_CRC,
37397            TERRAIN_DATA_DATA::ID => TERRAIN_DATA_DATA::EXTRA_CRC,
37398            TERRAIN_REPORT_DATA::ID => TERRAIN_REPORT_DATA::EXTRA_CRC,
37399            TERRAIN_REQUEST_DATA::ID => TERRAIN_REQUEST_DATA::EXTRA_CRC,
37400            TIMESYNC_DATA::ID => TIMESYNC_DATA::EXTRA_CRC,
37401            TIME_ESTIMATE_TO_TARGET_DATA::ID => TIME_ESTIMATE_TO_TARGET_DATA::EXTRA_CRC,
37402            TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID => {
37403                TRAJECTORY_REPRESENTATION_BEZIER_DATA::EXTRA_CRC
37404            }
37405            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID => {
37406                TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::EXTRA_CRC
37407            }
37408            TUNNEL_DATA::ID => TUNNEL_DATA::EXTRA_CRC,
37409            UAVCAN_NODE_INFO_DATA::ID => UAVCAN_NODE_INFO_DATA::EXTRA_CRC,
37410            UAVCAN_NODE_STATUS_DATA::ID => UAVCAN_NODE_STATUS_DATA::EXTRA_CRC,
37411            UTM_GLOBAL_POSITION_DATA::ID => UTM_GLOBAL_POSITION_DATA::EXTRA_CRC,
37412            V2_EXTENSION_DATA::ID => V2_EXTENSION_DATA::EXTRA_CRC,
37413            VFR_HUD_DATA::ID => VFR_HUD_DATA::EXTRA_CRC,
37414            VIBRATION_DATA::ID => VIBRATION_DATA::EXTRA_CRC,
37415            VICON_POSITION_ESTIMATE_DATA::ID => VICON_POSITION_ESTIMATE_DATA::EXTRA_CRC,
37416            VIDEO_STREAM_INFORMATION_DATA::ID => VIDEO_STREAM_INFORMATION_DATA::EXTRA_CRC,
37417            VIDEO_STREAM_STATUS_DATA::ID => VIDEO_STREAM_STATUS_DATA::EXTRA_CRC,
37418            VISION_POSITION_ESTIMATE_DATA::ID => VISION_POSITION_ESTIMATE_DATA::EXTRA_CRC,
37419            VISION_SPEED_ESTIMATE_DATA::ID => VISION_SPEED_ESTIMATE_DATA::EXTRA_CRC,
37420            WHEEL_DISTANCE_DATA::ID => WHEEL_DISTANCE_DATA::EXTRA_CRC,
37421            WIFI_CONFIG_AP_DATA::ID => WIFI_CONFIG_AP_DATA::EXTRA_CRC,
37422            WINCH_STATUS_DATA::ID => WINCH_STATUS_DATA::EXTRA_CRC,
37423            WIND_COV_DATA::ID => WIND_COV_DATA::EXTRA_CRC,
37424            _ => 0,
37425        }
37426    }
37427    fn target_system_id(&self) -> Option<u8> {
37428        match self {
37429            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(inner) => Some(inner.target_system),
37430            Self::CANFD_FRAME(inner) => Some(inner.target_system),
37431            Self::CAN_FILTER_MODIFY(inner) => Some(inner.target_system),
37432            Self::CAN_FRAME(inner) => Some(inner.target_system),
37433            Self::CHANGE_OPERATOR_CONTROL(inner) => Some(inner.target_system),
37434            Self::COMMAND_ACK(inner) => Some(inner.target_system),
37435            Self::COMMAND_CANCEL(inner) => Some(inner.target_system),
37436            Self::COMMAND_INT(inner) => Some(inner.target_system),
37437            Self::COMMAND_INT_STAMPED(inner) => Some(inner.target_system),
37438            Self::COMMAND_LONG(inner) => Some(inner.target_system),
37439            Self::COMMAND_LONG_STAMPED(inner) => Some(inner.target_system),
37440            Self::FILE_TRANSFER_PROTOCOL(inner) => Some(inner.target_system),
37441            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(inner) => Some(inner.target_system),
37442            Self::GIMBAL_DEVICE_SET_ATTITUDE(inner) => Some(inner.target_system),
37443            Self::GIMBAL_MANAGER_SET_ATTITUDE(inner) => Some(inner.target_system),
37444            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(inner) => Some(inner.target_system),
37445            Self::GIMBAL_MANAGER_SET_PITCHYAW(inner) => Some(inner.target_system),
37446            Self::GPS_INJECT_DATA(inner) => Some(inner.target_system),
37447            Self::LOGGING_ACK(inner) => Some(inner.target_system),
37448            Self::LOGGING_DATA(inner) => Some(inner.target_system),
37449            Self::LOGGING_DATA_ACKED(inner) => Some(inner.target_system),
37450            Self::LOG_ERASE(inner) => Some(inner.target_system),
37451            Self::LOG_REQUEST_DATA(inner) => Some(inner.target_system),
37452            Self::LOG_REQUEST_END(inner) => Some(inner.target_system),
37453            Self::LOG_REQUEST_LIST(inner) => Some(inner.target_system),
37454            Self::MISSION_ACK(inner) => Some(inner.target_system),
37455            Self::MISSION_CLEAR_ALL(inner) => Some(inner.target_system),
37456            Self::MISSION_COUNT(inner) => Some(inner.target_system),
37457            Self::MISSION_ITEM(inner) => Some(inner.target_system),
37458            Self::MISSION_ITEM_INT(inner) => Some(inner.target_system),
37459            Self::MISSION_REQUEST(inner) => Some(inner.target_system),
37460            Self::MISSION_REQUEST_INT(inner) => Some(inner.target_system),
37461            Self::MISSION_REQUEST_LIST(inner) => Some(inner.target_system),
37462            Self::MISSION_REQUEST_PARTIAL_LIST(inner) => Some(inner.target_system),
37463            Self::MISSION_SET_CURRENT(inner) => Some(inner.target_system),
37464            Self::MISSION_WRITE_PARTIAL_LIST(inner) => Some(inner.target_system),
37465            Self::OPEN_DRONE_ID_AUTHENTICATION(inner) => Some(inner.target_system),
37466            Self::OPEN_DRONE_ID_BASIC_ID(inner) => Some(inner.target_system),
37467            Self::OPEN_DRONE_ID_LOCATION(inner) => Some(inner.target_system),
37468            Self::OPEN_DRONE_ID_MESSAGE_PACK(inner) => Some(inner.target_system),
37469            Self::OPEN_DRONE_ID_OPERATOR_ID(inner) => Some(inner.target_system),
37470            Self::OPEN_DRONE_ID_SELF_ID(inner) => Some(inner.target_system),
37471            Self::OPEN_DRONE_ID_SYSTEM(inner) => Some(inner.target_system),
37472            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(inner) => Some(inner.target_system),
37473            Self::PARAM_EXT_REQUEST_LIST(inner) => Some(inner.target_system),
37474            Self::PARAM_EXT_REQUEST_READ(inner) => Some(inner.target_system),
37475            Self::PARAM_EXT_SET(inner) => Some(inner.target_system),
37476            Self::PARAM_MAP_RC(inner) => Some(inner.target_system),
37477            Self::PARAM_REQUEST_LIST(inner) => Some(inner.target_system),
37478            Self::PARAM_REQUEST_READ(inner) => Some(inner.target_system),
37479            Self::PARAM_SET(inner) => Some(inner.target_system),
37480            Self::PING(inner) => Some(inner.target_system),
37481            Self::PLAY_TUNE(inner) => Some(inner.target_system),
37482            Self::PLAY_TUNE_V2(inner) => Some(inner.target_system),
37483            Self::RC_CHANNELS_OVERRIDE(inner) => Some(inner.target_system),
37484            Self::REQUEST_DATA_STREAM(inner) => Some(inner.target_system),
37485            Self::REQUEST_EVENT(inner) => Some(inner.target_system),
37486            Self::RESPONSE_EVENT_ERROR(inner) => Some(inner.target_system),
37487            Self::SAFETY_SET_ALLOWED_AREA(inner) => Some(inner.target_system),
37488            Self::SERIAL_CONTROL(inner) => Some(inner.target_system),
37489            Self::SETUP_SIGNING(inner) => Some(inner.target_system),
37490            Self::SET_ACTUATOR_CONTROL_TARGET(inner) => Some(inner.target_system),
37491            Self::SET_ATTITUDE_TARGET(inner) => Some(inner.target_system),
37492            Self::SET_GPS_GLOBAL_ORIGIN(inner) => Some(inner.target_system),
37493            Self::SET_HOME_POSITION(inner) => Some(inner.target_system),
37494            Self::SET_MODE(inner) => Some(inner.target_system),
37495            Self::SET_POSITION_TARGET_GLOBAL_INT(inner) => Some(inner.target_system),
37496            Self::SET_POSITION_TARGET_LOCAL_NED(inner) => Some(inner.target_system),
37497            Self::SUPPORTED_TUNES(inner) => Some(inner.target_system),
37498            Self::TIMESYNC(inner) => Some(inner.target_system),
37499            Self::TUNNEL(inner) => Some(inner.target_system),
37500            Self::V2_EXTENSION(inner) => Some(inner.target_system),
37501            _ => None,
37502        }
37503    }
37504    fn target_component_id(&self) -> Option<u8> {
37505        match self {
37506            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(inner) => Some(inner.target_component),
37507            Self::CANFD_FRAME(inner) => Some(inner.target_component),
37508            Self::CAN_FILTER_MODIFY(inner) => Some(inner.target_component),
37509            Self::CAN_FRAME(inner) => Some(inner.target_component),
37510            Self::COMMAND_ACK(inner) => Some(inner.target_component),
37511            Self::COMMAND_CANCEL(inner) => Some(inner.target_component),
37512            Self::COMMAND_INT(inner) => Some(inner.target_component),
37513            Self::COMMAND_INT_STAMPED(inner) => Some(inner.target_component),
37514            Self::COMMAND_LONG(inner) => Some(inner.target_component),
37515            Self::COMMAND_LONG_STAMPED(inner) => Some(inner.target_component),
37516            Self::FILE_TRANSFER_PROTOCOL(inner) => Some(inner.target_component),
37517            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(inner) => Some(inner.target_component),
37518            Self::GIMBAL_DEVICE_SET_ATTITUDE(inner) => Some(inner.target_component),
37519            Self::GIMBAL_MANAGER_SET_ATTITUDE(inner) => Some(inner.target_component),
37520            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(inner) => Some(inner.target_component),
37521            Self::GIMBAL_MANAGER_SET_PITCHYAW(inner) => Some(inner.target_component),
37522            Self::GPS_INJECT_DATA(inner) => Some(inner.target_component),
37523            Self::LOGGING_ACK(inner) => Some(inner.target_component),
37524            Self::LOGGING_DATA(inner) => Some(inner.target_component),
37525            Self::LOGGING_DATA_ACKED(inner) => Some(inner.target_component),
37526            Self::LOG_ERASE(inner) => Some(inner.target_component),
37527            Self::LOG_REQUEST_DATA(inner) => Some(inner.target_component),
37528            Self::LOG_REQUEST_END(inner) => Some(inner.target_component),
37529            Self::LOG_REQUEST_LIST(inner) => Some(inner.target_component),
37530            Self::MISSION_ACK(inner) => Some(inner.target_component),
37531            Self::MISSION_CLEAR_ALL(inner) => Some(inner.target_component),
37532            Self::MISSION_COUNT(inner) => Some(inner.target_component),
37533            Self::MISSION_ITEM(inner) => Some(inner.target_component),
37534            Self::MISSION_ITEM_INT(inner) => Some(inner.target_component),
37535            Self::MISSION_REQUEST(inner) => Some(inner.target_component),
37536            Self::MISSION_REQUEST_INT(inner) => Some(inner.target_component),
37537            Self::MISSION_REQUEST_LIST(inner) => Some(inner.target_component),
37538            Self::MISSION_REQUEST_PARTIAL_LIST(inner) => Some(inner.target_component),
37539            Self::MISSION_SET_CURRENT(inner) => Some(inner.target_component),
37540            Self::MISSION_WRITE_PARTIAL_LIST(inner) => Some(inner.target_component),
37541            Self::OPEN_DRONE_ID_AUTHENTICATION(inner) => Some(inner.target_component),
37542            Self::OPEN_DRONE_ID_BASIC_ID(inner) => Some(inner.target_component),
37543            Self::OPEN_DRONE_ID_LOCATION(inner) => Some(inner.target_component),
37544            Self::OPEN_DRONE_ID_MESSAGE_PACK(inner) => Some(inner.target_component),
37545            Self::OPEN_DRONE_ID_OPERATOR_ID(inner) => Some(inner.target_component),
37546            Self::OPEN_DRONE_ID_SELF_ID(inner) => Some(inner.target_component),
37547            Self::OPEN_DRONE_ID_SYSTEM(inner) => Some(inner.target_component),
37548            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(inner) => Some(inner.target_component),
37549            Self::PARAM_EXT_REQUEST_LIST(inner) => Some(inner.target_component),
37550            Self::PARAM_EXT_REQUEST_READ(inner) => Some(inner.target_component),
37551            Self::PARAM_EXT_SET(inner) => Some(inner.target_component),
37552            Self::PARAM_MAP_RC(inner) => Some(inner.target_component),
37553            Self::PARAM_REQUEST_LIST(inner) => Some(inner.target_component),
37554            Self::PARAM_REQUEST_READ(inner) => Some(inner.target_component),
37555            Self::PARAM_SET(inner) => Some(inner.target_component),
37556            Self::PING(inner) => Some(inner.target_component),
37557            Self::PLAY_TUNE(inner) => Some(inner.target_component),
37558            Self::PLAY_TUNE_V2(inner) => Some(inner.target_component),
37559            Self::RC_CHANNELS_OVERRIDE(inner) => Some(inner.target_component),
37560            Self::REQUEST_DATA_STREAM(inner) => Some(inner.target_component),
37561            Self::REQUEST_EVENT(inner) => Some(inner.target_component),
37562            Self::RESPONSE_EVENT_ERROR(inner) => Some(inner.target_component),
37563            Self::SAFETY_SET_ALLOWED_AREA(inner) => Some(inner.target_component),
37564            Self::SERIAL_CONTROL(inner) => Some(inner.target_component),
37565            Self::SETUP_SIGNING(inner) => Some(inner.target_component),
37566            Self::SET_ACTUATOR_CONTROL_TARGET(inner) => Some(inner.target_component),
37567            Self::SET_ATTITUDE_TARGET(inner) => Some(inner.target_component),
37568            Self::SET_POSITION_TARGET_GLOBAL_INT(inner) => Some(inner.target_component),
37569            Self::SET_POSITION_TARGET_LOCAL_NED(inner) => Some(inner.target_component),
37570            Self::SUPPORTED_TUNES(inner) => Some(inner.target_component),
37571            Self::TIMESYNC(inner) => Some(inner.target_component),
37572            Self::TUNNEL(inner) => Some(inner.target_component),
37573            Self::V2_EXTENSION(inner) => Some(inner.target_component),
37574            _ => None,
37575        }
37576    }
37577}